Jump to content
Sign in to follow this  
HogRoot

zSniper in Treetop

Recommended Posts

OK guys I need some help. I am making a mission where the guys in my unit will be on patrol along a certain path. What I want to do is is put some snipers up in the tops of the trees like they use to do in 'Nam. I am using this

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setPos [getPos this select 0, getPos this select 1, 20]

And messing around with the height trying to get him to stay in the tree, but they always fall to the ground. Does anyone have a better way to accoplish this?

Thanks

HogRoot

Share this post


Link to post
Share on other sites

We have an Editing forum for some reason.

Moving.

Share this post


Link to post
Share on other sites

Heya mate, create your unit, for this example call him bob

In his int add <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "bob.sqs"

this is the bob.sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop

bob setpos [ getPos bob select 0, getPos bob select 1, 20]

goto "loop"

GL

Share this post


Link to post
Share on other sites

This will cause the crash, you need to add some delay:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#loop

bob setpos [ getPos bob select 0, getPos bob select 1, 20]

~0.01

goto "loop"

But even then the soldier will be shivering because of constantly updated position.

He may also fall down when he change direction and I fear he won't see anything (AI is not trained to this smile_o.gif).

Share this post


Link to post
Share on other sites

Create a static object like a crate first, put the object into the tree and let the ai stand on the object.

And don't use a palette for this.

Share this post


Link to post
Share on other sites

Hey

It´s better to do what i0n0s wrote.

I OFP I used a pallet but in ArmA it isn´t possible touse it.

Use a (off) fire or something like that and place the unit on it.

I did it in one of my missions.

Best regards,

Mr-Murray

Share this post


Link to post
Share on other sites

Hi, i'm making a "sniper's nest" pack (w an usable climbingstick) for my festung minimod. ATM it's under beta testing, stay tuned smile_o.gif

Share this post


Link to post
Share on other sites

Why in gods name would a sniper EVER whant to stay in

the same spot for more the 2 shots???

And with ECS its enough with ONE shot, BANG your dead...

Fire and movement, fire and move, fire and move...

Basic military training....

Share this post


Link to post
Share on other sites

Thanks for all the responses guys...I will try them and see how it works.

@Andersson...In Vietnam the snipers would climb up in a tree and tie themselves off with a rope and set there waiting for GIs.

@Wollie ....Excuse me...thought I was in the right thread

Share this post


Link to post
Share on other sites

Yea, thats like 40 years ago.... rofl.gif

Dumb

banghead.gif

Like i said, 2 shots, then move to a new location..

You still can have the same targetzone, but from

another location..

Share this post


Link to post
Share on other sites

it is not dumb

snipers change the location if the areal is no longer safe or he was identified whistle.gifwink_o.gif

firing and move is a basical soldier tactic

snipers are not assaultsoldiers if you have a good position you can kill a 5man squad or more

"You still can have the same targetzone, but from

another location.." thats right, but sometimes dont need a new position(all dead) wink_o.gif

and it is a game and he can do what he want

peace wink_o.gifbiggrin_o.gif

good luck hogroot

Share this post


Link to post
Share on other sites
Quote[/b] ]=Fk Andersson,May 18 2008,12:19]Yea, thats like 40 years ago.... rofl.gif

Dumb

banghead.gif

Like i said, 2 shots, then move to a new location..

You still can have the same targetzone, but from

another location..

Wow...ok let me spell it out for you...We are using the PMC Vietnam Total Experience Mod.

Thanks TellX....I have my snipers positioned up in the trees...I used an unlit fire pit and placed the sniper on top of it...the only problem I have now is the sniper isn't firing at my troops.  I can start from 200m away and walk right under him and he still doesn't fire...and most of the time he has his weapon pointed straight up.  I have tried placing him on different objects to no avail.  This is what I have in his init line

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this setPos [getPos this select 0, getPos this select 1, 15]; this disableAI "move"; this disableAI "dotarget"; this setCombatMode "RED"; this setunitpos "middle";

  ...and I have also played around with removing certain commands out of it, but still doesn't get a reaction no matter what I take out or leave in.  If I put him 5 feet off the ground it works fine..my ai squad fire on him and he fires back..but I need him @20 feet up.

Share this post


Link to post
Share on other sites

@ hogroot

have the same prob.it works but not in tree. trees block the field of vision i think

place it a little bit outside

or you must search for free places in trees

or ai need wh^^ biggrin_o.gif

Share this post


Link to post
Share on other sites

On a tangent, getting AI snipers to fire and move, fire and move, would be a nightmare of scripting and editing IMO. It took me long enough just to get working AI snipers at all wink_o.gif

Of course, you could always have them randomly move around and just "vanish" in between spots where they're shooting from, but that's a little bit unfair in terms of realism or game mechanics....

Share this post


Link to post
Share on other sites

I finally got them to work. I placed them on an unlit fire in the objects section and elevated both using the setpos command. It is a beast moving them around getting them in the exact location in the branches that will give them a good FOV...but hours...days later it was finally accomplished.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×