• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] TriggerUnRegisterEvent

Status
Not open for further replies.
Level 17
Joined
Apr 13, 2008
Messages
1,610
Hi, I was making dynamic triggers today and when I was adding all kind of TriggerRegisterEvents with unit variables as parameter I was wondering what happens to them once the registered unit is removed from the game.
Do these lines stay there in the memory until the end of game or do they get released when the unit is removed?
If they stay there, should I remove them using event type variables?
 
Level 17
Joined
Apr 13, 2008
Messages
1,610
Yes, but let's say I have, I don't know, 70 units registered to a trigger with some event. This means I have to destroy the trigger and readd the units OR create 1 trigger / unit from the begining. The third solution is to have 1 trigger but add an additional condition, like, when I don't want the unit to fire the trigger I add the unit a dummy ability or change its custom unit value or something like that.

Thanks for the help again.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
No and thats why someone needs a handle attachment system for making Any Unit Takes Damage
otherwise that someone just would unregister that unit from the global trigger
 
Level 13
Joined
Nov 22, 2006
Messages
1,260
Crap, I read you're post like 5 times and I still don't get it. But I have a theory on what you said and this would be the answer: you can't unregister a unit from a trigger and you can't remove the event unless you destroy the actual trigger.
 
Status
Not open for further replies.
Top