19 posts joined 2004-09-03
#1 2006-10-23
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.
164 posts joined 2005-07-12
#2 2006-10-23
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 nothingYour 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...
19 posts joined 2004-09-03
#3 2006-10-23
Didn't work. Says "Expected ')'"
1,418 posts Here joined 2005-12-14
#4 2006-10-23
it should be
function Trig_Damage_Functions_Actions
,not just
Trig_Damage_Functions_Actions
19 posts joined 2004-09-03
#5 2006-10-23
PurplePoot it should befunction Trig_Damage_Functions_Actions ,not just Trig_Damage_Functions_ActionsNow 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...
1,418 posts Here joined 2005-12-14
#6 2006-10-23
OOPS
idk how to do triggeractions
*notes to self to learn*
probably just like Conditionfuncs tho
19 posts joined 2004-09-03
#7 2006-10-24
Attempts are appreciated, though my problem remains unsolved...
Surely someone knows how to remove events...anyone?
153 posts Sweden joined 2004-05-19
#8 2006-10-24
I think you might have to recreate the trigger by destroying and readding it
132 posts joined 2006-05-22
#9 2006-10-24
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.
1,418 posts Here joined 2005-12-14
#10 2006-10-24
does it? that asks for a triggeraction, what you gave was a code.
who knows, maybe i was right after all
19 posts joined 2004-09-03
#11 2006-10-24
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.
164 posts joined 2005-07-12
#12 2006-10-24
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.
19 posts joined 2004-09-03
#13 2006-10-24
Well I was asking about how to remove events...
1,418 posts Here joined 2005-12-14
#14 2006-10-24
dont think you can, without completely resetting the trigger.
*and dont caps Function, it should be function*
19 posts joined 2004-09-03
#15 2006-10-24
PurplePoot dont 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?