Jump to content
Sign in to follow this  
OLO

Range simulation problem

Recommended Posts

Hello,

what I want to do is to create a little range, so when unit moves to far away from the area it turns on some events. I've tried to use a "NOT PRESENT" type of trigger but I've read (and checked) whenever I put a unit in thisList of trigger condition, the trigger will behave exactly the same as "PRESENT" type. Am I doing something wrong here or there is maybe a differrent solution for that.

I would be very appreciate for helping me.

Share this post


Link to post
Share on other sites

!(unitname in thisList)

using above in trigger condition means not in thislist, equivalent to your not present condition.

Share this post


Link to post
Share on other sites

That because the condition is no longer 'this'. 'this' means the trigger should operate like the settings you set.

thisList is constantly set to all the units that match your PRESENT, eg BLUFOR PRESENT. If you use NOT PRESENT I think that it is not set to anything. Imagine if you had 500 units on the map and only 1 was in the trigger then it had to fill thisList with 499 units 2 times per second. So thisList and NOT PRESENT don't work together.

Set the trigger to PRESENT and use myUnit in thisList as the condition, but put your code in ON DEACTIVATION part instead.

An alternative is to put the code in ON ACTIVATION and reverse the condition:

!(myUnit in thisList)

The difference between this and the other is that the latter will activate even if the unit has not entered the trigger yet, while in the first the unit will first have to enter the trigger then leave for it to activate.

Oh don't forget to set the trigger to REPEATABLE if you need it do activate/deactivate multiple times.

Share this post


Link to post
Share on other sites

God damn it...that makes sense and it's very easy. I should have come up with this by my own. Thank so much for the solutions, both of you.

Problem solved.

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  

×