Warcraft III resources & community, 2003–2006 · archived

What's wrong here?

23 posts
#1

What's wrong here?

call TriggerRemoveAction( gg_trg_Damage_Functions, GetTriggerUnit(), EVENT_UNIT_DAMAGED)


I'm using gui triggers but I have a custom script action with this. What I'm trying to do is have an event removed of a unit getting damaged (which was an event created from another trigger). This custom script is in the same trigger in which the event is to be removed (not sure if that has any relevance though). I'm pretty sure the problem is mostly with how I tried to do this (or perhaps it is the wrong kind of function) so I think no more detail will be needed for someone to solve this problem, but more could be provided if necessary.
#2
umm... Now what do you want? To remove the actions from the trigger, or to remove the event?
native TriggerRemoveAction  takes trigger whichTrigger, triggeraction whichAction returns nothing

Your code should be sthg like this:
call TriggerRemoveAction( gg_trg_Damage_Functions, Trig_Damage_Functions_Actions)


Hey, a question: Can events be deleted/removed? I couldn't find such function...
#3
Didn't work. Says "Expected ')'"
#4
it should be

function Trig_Damage_Functions_Actions

,not just

Trig_Damage_Functions_Actions
#5
PurplePootit should be

function Trig_Damage_Functions_Actions

,not just

Trig_Damage_Functions_Actions


Now the errors have been multiplied by 3...

"Line 81: Invalid argument type (unknown type)"
"Line 106: Expected 'endif' (unknown type)"
"Line 108: Expected 'endif' (unknown type)"

and the custom script is Line 80, everything else is gui...
#6
OOPS

idk how to do triggeractions

*notes to self to learn*

probably just like Conditionfuncs tho
#7
Attempts are appreciated, though my problem remains unsolved...

Surely someone knows how to remove events...anyone?
#8
I think you might have to recreate the trigger by destroying and readding it
#9
call TriggerRemoveAction( <Trigger Variable> ,function <Name of Action> )


This works with a global trigger and it's action.
(just tested it)

If not, the fault has to be elsewhere.
#10
does it? that asks for a triggeraction, what you gave was a code.

who knows, maybe i was right after all :D
#11
LordZsar1
call TriggerRemoveAction( <Trigger Variable> ,function <Name of Action> )


This works with a global trigger and it's action.
(just tested it)

If not, the fault has to be elsewhere.


Is this right?

call TriggerRemoveAction( gg_trg_Damage_Functions, Function GetTriggerUnit(), EVENT_UNIT_DAMAGED )


Says "Expected a name" on it.
#12
Uhh... :?
GetTriggerUnit(), EVENT_UNIT_DAMAGED

This is an EVENT. (As it sais...)

call TriggerRemoveAction() removes the ACTION from the trigger...

you're a bit confused with these things.
#13
Well I was asking about how to remove events...
#14
dont think you can, without completely resetting the trigger.

*and dont caps Function, it should be function*
#15
PurplePootdont think you can, without completely resetting the trigger.


You can create events with triggers but can't remove them? How annoying..

Well how do you "reset" a trigger?