Home   Help Search Login Register  

Author Topic: Setting dist. to add/remove a action  (Read 1420 times)

0 Members and 1 Guest are viewing this topic.

CooK

  • Guest
Setting dist. to add/remove a action
« on: 19 Oct 2002, 03:38:00 »
(The Example)- im making a map where the a person goes up to a object and i addaction ( iknow how to addaction + script).

My question(1) is how u put it where a person comes up to it and a action appears ( i dont want to add action to just the object)? .....<= 0.5  that kind of command...

== so far i know how to make it appear, but i dont know how to make it dissapear (the action). i only want this for selected soldiers

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Setting dist. to add/remove a action
« Reply #1 on: 19 Oct 2002, 07:41:58 »
Welcome to the forums, Cook

Try something like this:

Trigger

Radius: 0,0
Condition: none (repeatedly)
Condition Field: "_x distance object < 2" count [ unit1,unit2,unit3...] > 0
OnActivation field: actionname = object addaction ["Action","Action.sqs"]
OnDeactivation Field: object removeaction actionname

Make a trigger like that one, and include all the units you want to set the action off in the bold array. Then whenever any of those units approaches within 2m of object the action will be added to it. When all those units are more than 2m from object, the action will be removed ;)