Jump to content
Sign in to follow this  
i_need_help

How do u make a trigger follow a unit

Recommended Posts

Setpos the trigger (must be named) over the uaz.

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

#loop

triggername setpos (getpos uazname)

~0.1

goto "loop"

RED

Share this post


Link to post
Share on other sites

[uaz,trigger] exec "trigfollow.sqs"

trigfollow.sqs would look like this:

_vehicle = _this select 0

_trig = _this select 1

#loop

_trig setpos getpos _vehicle

~.1

goto "loop"

But has anyone else noticed problems with moving triggers? A moved trigger doesn't seem to register the new stuff that it should for about .5-5 seconds, which can screw up scripts. Is there some way to force a trigger detection?

Share this post


Link to post
Share on other sites

WHAT!? You can move triggers!rock.gif?rock.gif? I never knew this. Can you move waypoints too?? I need to get a group to dynamically Search & Destroy where I click on the map.

That five or so second delay is wierd, yes. I noticed the same thing when you addAction to an object and move it. The action doesn't show up again on the house until 8 or so seconds have passed.

Doolittle

Share this post


Link to post
Share on other sites
where do u put the exec line uaz or trigger

You can add the line:

[uaz,trigger] exec "trigfollow.sqs"

to an init line of any unit, object or vehicle. You can also execute it in "init.sqs".

Share this post


Link to post
Share on other sites
WHAT!?  You can move triggers!rock.gif?rock.gif?  I never knew this.  Can you move waypoints too??  I need to get a group to dynamically Search & Destroy where I click on the map.

That five or so second delay is wierd, yes.  I noticed the same thing when you addAction to an object and move it.  The action doesn't show up again on the house until 8 or so seconds have passed.

Doolittle

Use the setwppost command to move waypoints.

RED

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  

×