Home   Help Search Login Register  

Author Topic: removeaction  (Read 559 times)

0 Members and 1 Guest are viewing this topic.

marcus3

  • Guest
removeaction
« on: 13 Mar 2005, 00:49:46 »
ok now i have a script for buying a car.
when you walk up to the car dealer a action comes up saying
"buy cars" then if you click it that action go's away then a nother action comes up "buy red car"
then if you click that it go's away then 2 actions come up "no thanks" and "buy red car"
if you click "no thanks" all the actions go away. then you can walk away then back and do the same thing over and over agin and i wont matter.
now its all set up but the problem is...
that after you buy the car a come back you can buy it all over agin
so what i need is a way to remove the action "buy red car"
but not remove the action "buy cars"
so thanks for your help.

Offline Flauta

  • Members
  • *
  • There is no knownledge, that is no power
    • Chek mi FLog
Re:removeaction
« Reply #1 on: 13 Mar 2005, 02:22:42 »
maybe doing this?

having this
buyredcar = cardealer addaction ["buy red  cars",buycars.sqs]
use this
cardealer removeaction buyredcar

not sure about the removeaction command..

cheers

Kyle Sarnik

  • Guest
Re:removeaction
« Reply #2 on: 13 Mar 2005, 22:49:03 »
The easiest way (I find) to remove an addaction wen used is buy this:

buycars.sqs
Code: [Select]
_obj = _this select 0
_ID = _this select 2

_obj removeaction _ID


marcus3

  • Guest
Re:removeaction
« Reply #3 on: 14 Mar 2005, 16:37:45 »
it still dont work
i need it where after i buy the car i cant buy it over agin.
my cant think of how to do it

Kyle Sarnik

  • Guest
Re:removeaction
« Reply #4 on: 14 Mar 2005, 20:30:13 »
Are you sure you copied it right? What I posted should work, it will remove the action when it is activated.

marcus3

  • Guest
Re:removeaction
« Reply #5 on: 18 Mar 2005, 21:21:45 »
thanks guys i got it to work
:)