Home   Help Search Login Register  

Author Topic: removing a acton  (Read 448 times)

0 Members and 1 Guest are viewing this topic.

rbond

  • Guest
removing a acton
« on: 25 Aug 2003, 20:54:51 »
how do i remove a action that i have given to the player?
ie player option 'save game'

Offline Artak

  • The old beanbag shaker
  • Former Staff
  • ****
  • You want to talk about it, yes?
    • OFP Team Finlanders
Re:removing a acton
« Reply #1 on: 25 Aug 2003, 21:04:17 »
when you add an action like this
action1 = unit addaction ["blahblah..

you can remove it like this
unit removeaction action1
Not all is lost.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:removing a acton
« Reply #2 on: 25 Aug 2003, 22:10:38 »
Also, if you don't name the action as Artak suggested
there's still a way:

once the action is called, you can access the action
id inside the script (i think it's _this select 2)

best to figure it out is:

hint format ["%1",_this]

This will show you the whole array, which is passed
to the script when pushing the action-button.

As far as i remember the array contains of:

_this select 0   -  owner of the action

_this select 1   -  caller of the action

_this select 2   -  action-id

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted