Home   Help Search Login Register  

Author Topic: removeAction by name Doesn't Work in MP!!!  (Read 1736 times)

0 Members and 1 Guest are viewing this topic.

Lone-Wolf

  • Guest
removeAction by name Doesn't Work in MP!!!
« on: 15 Apr 2009, 23:44:14 »
 :whistle: Once again I'm baffled by a simple scripting problem.
When I attempt to remove an action by it's name (from a script) nothing happens.

_player removeAction TVaction1

The given player still has the action.

Help?  :confused:

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: removeAction by name Doesn't Work in MP!!!
« Reply #1 on: 16 Apr 2009, 03:00:39 »
removeAction requires you to supply the index number of the action not the name of the action.

object removeAction index#

First action added to an object will have the index 0, the next would be index 1 ... etc.


Planck
I know a little about a lot, and a lot about a little.

Lone-Wolf

  • Guest
Re: removeAction by name Doesn't Work in MP!!!
« Reply #2 on: 16 Apr 2009, 17:13:31 »
Ok, I already knew that but I need to know how to remove a specific action.  :dry:

It would be handy if someone could drop a tutorial or some notes on how to remove specific actions - be it by some special way of determining the reference number or otherwise.

Thanks.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: removeAction by name Doesn't Work in MP!!!
« Reply #3 on: 16 Apr 2009, 20:53:26 »
When you first use addAction the returned value will be the index number of that action:

_index = addAction ["TVaction1", "TVaction.sqs"]

_index would then hold the index number of the action.


Planck
I know a little about a lot, and a lot about a little.