HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

clear events?

10-13-2003, 12:23 AM#1
Unindel
is there any way to clear the events of a trigger? i'm adding events to a trigger i have in order that it can have an event such that it runs when a unit enters a rect variable i have (spaceNum):

trigger 1:
Action:
call TriggerRegisterEnterRectSimple( gg_trg_BuyYes, udg_spaceNum[udg_playerOnSpace[udg_playerMoving]] )


this adds the event to my trigger "BuyYes" that when a unit enters the rect currently stored in my rect array spaceNum, BuyYes will run. This is good so that I don't have to turn on/off a trigger for each rect i have on my map. But I can't figure out how to remove that event afterward? Now everytime a unit go through the rect, the trigger runs. I tried the reset trigger function, but it didn't work. I see that there is a clear conditions/actions functions, but I need one for event (i don't have any other events for the trigger, so it is ok if all of them are cleared).

any help please?
10-13-2003, 01:14 AM#2
SpectreReturns
Make lots of copys of it with blank events. Then just add them in as you need it.
10-13-2003, 01:32 AM#3
Unindel
://// what?? thats the only way? i might as well just do a trigger for each rect instead of using a variable that changes... makin 40 copies of the same trigger doesn seem too good :(

isn there any way to clear events?
10-13-2003, 07:54 AM#4
Krakou
Try UMSWE, if am not wrong he has an action clear event.
10-13-2003, 08:28 AM#5
KaTTaNa
There is no function to remove events, but you can destroy the trigger, and then recreate it.

For example:
Code:
call DestroyTrigger( gg_trg_BuyYes )
set gg_trg_BuyYes = CreateTrigger()
call TriggerAddAction( gg_trg_BuyYes, function  Trigger_BuyYes_Actions )
That way you can clear the events.
10-13-2003, 12:31 PM#6
PitzerMike
Rather than destroying and recreating the trigger better use the ResetTrigger function to reset the events, conditions and actions of the trigger and add those again.