Home   Help Search Login Register  

Author Topic: addaction  (Read 428 times)

0 Members and 1 Guest are viewing this topic.

Cooba

  • Guest
addaction
« on: 29 Aug 2003, 20:17:26 »
I have a little problem. I used  command player addAction ["Take hostage","hostage.sqs"]. This command is available for player only 1  time, when he get close to this hostage (10 meters or less) - but when its happened command addaction is still available even when player is far from hostage.

Pleas, i need advice.
Sorry for my english  :)



mikeb

  • Guest
Re:addaction
« Reply #1 on: 29 Aug 2003, 21:31:21 »
i'm assuming you use a trigger or distance condition in a script to activate the addaction.

name your action first:

NAME = player addaction ["take hostage", "hostage.sqs"]


Then have a trigger that activates on the following:

player distance hostage >=5

with the activation as:

player removeaction NAME


remember to set the trigger to repeatedly for both this trigger and the one that activates the action as available


make sense?  I'm english but my english still sucks!!

Offline Doolittle

  • Contributing Member
  • **
  • _this select 0
Re:addaction
« Reply #2 on: 29 Aug 2003, 23:13:29 »
Add the action to the hostage instead of the player.

Doolittle

Cooba

  • Guest
Re:addaction
« Reply #3 on: 29 Aug 2003, 23:23:36 »
Thanx OFBrothers: let the force be with you
 8)