• 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.

[General] [Trigger - Add Event] Cons

Status
Not open for further replies.
Level 3
Joined
Sep 21, 2013
Messages
36
Hello guys. I have a question.
Can trigger be overloaded through [Trigger - Add Event] and, therefore, lead to the trigger malfunction? Is there any limit for the events?
Thanks in advance.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
you talk jass-ish so I dont fully understand.

but as far as I know there is no limit on the ammout of events. But I think manys event will make it lag.

In the case of many events I would split them up into seperate triggers. This is a must in some systems, if it is a tempoary event. Like unit X takes damage. When that unit dies you need to remove that event and that's impossible so after a while it will lagg for sure or atleast take much memory.

so you cant remove events but you can remove the trigger with the event.
 
I haven't encountered a limit, but just note that each event added counts as 1 handle, and as such, it occupies memory. You can clear those handles only by destroying the trigger.

That's why there are damage detection systems out there--the damage event requires you to input a particular unit, so to detect *any* damage from any unit, you must register the event for all units on the map. You can make a trigger to add the "takes damage" event whenever a unit enters the map, but it is a bit difficult to handle what happens when a unit is removed or dies. For some maps, you might not even have to worry about it (if your map doesn't use too many units, e.g. a hero arena). For others, it will matter more (e.g. footman frenzy). Damage detection systems will destroy the damage detection trigger and rebuild it occasionally to prevent the events from adding up indefinitely.
 
The limit is well over 100k events per trigger. ( after 100k i just stopped)
As said above with the 100k events it did use a decent amount of memory.
When destroying trigger that memory was released ( as everyone knows)

It would help if you explain what you are trying to do. But i would suggest managing it so you could destroy triggers. ( no reason to have 100 or so events when they are never gonna be used again)
 
Status
Not open for further replies.
Top