Jump to content
Sign in to follow this  
KMARTshoper

How to create a custom trigger?

Recommended Posts

I am having scripting issues regarding the creation of a custom trigger... Does anyone know how to make a trigger that, instead of east,west,anyone ,etc, etc, has "Vehicle", so that I can activate it when a vehicle crosses the trigger boundery???

THX....

G          recycleyourtrash@hotmail.com

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote </td></tr><tr><td id="QUOTE">Press F2 (Group) and group the trigger with the unit.<span id='postcolor'>

Well, i guess KMARTshoper is talking about any vehicle.

The grouping way only works with manned vehicles.

If you are talking about any vehicle, then do following:

Name all your vehicles (e.g: veh1, veh2, veh3, etc.)

Put all your vehicles into a string:

detveh=[veh1,veh2,veh3,etc.)

:note; you can use any units init field, or an init-trigger's

activation field (with a condition: true), to do that.

Then setup your trigger, where you want the vehicles to

be detected:

Activation: anybody/present/once

Triggername: triggerA

Then create another trigger:

Activation: none/repeatedly

Condition: "_x in detveh" count (list triggerA) > 0

Now what will happen?

The second trigger will check, if the list of triggerA

contains one of the vehicles of string "detveh".

The only problem in this case would be:

If there's already one of the vehicles inside the area

of triggerA (still inside), the trigger won't become activated

again, if another one enters the area.

But it would just take some more math tunings, to get it

working.

It depends on what you want to do, after the trigger became

activated.

~S~ CD

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  

×