Xenoche
Member
- Reaction score
- 18
I recently found a show damage system for my MLRPG map:
It works well, BUT...
I question the stablity of this trigger in my map as the number of events added to this trigger could well exceed the thousands after only the 1st part of the campaign
So my questions are:
1: How many events can be attached to a trigger before it becomes clumbersome?
2: Is it at all possible to remove the un-needed events using custom script or JASS?
3: If not, does anybody know of a system that somehow avoids this problem?
4: Is it safe to have an array of Show damages triggers, and after 100 events added the previous one is destroyed and the next "Show damages" trigger is enabled and so on?
example:
Code:
Detect Unit
Events
Unit - A unit enters (Playable map area)
Conditions
((Entering unit) is A Hero) Equal to False
Actions
Trigger - Add to Show Damages <gen> the event (Unit - (Triggering unit) Takes damage)
Code:
Show Damages
Events
Conditions
Actions
Set TEMP_POINT = (Position of (Triggering unit))
Floating Text - Create floating text that reads (String((Integer((Damage taken))))) at TEMP_POINT with Z offset 80.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 40.00% transparency
Floating Text - Change (Last created floating text): Disable permanence
Floating Text - Set the velocity of (Last created floating text) to 15.00 towards 90.00 degrees
Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 1.00 seconds
Custom script: call RemoveLocation (udg_TEMP_POINT)
It works well, BUT...
I question the stablity of this trigger in my map as the number of events added to this trigger could well exceed the thousands after only the 1st part of the campaign
So my questions are:
1: How many events can be attached to a trigger before it becomes clumbersome?
2: Is it at all possible to remove the un-needed events using custom script or JASS?
3: If not, does anybody know of a system that somehow avoids this problem?
4: Is it safe to have an array of Show damages triggers, and after 100 events added the previous one is destroyed and the next "Show damages" trigger is enabled and so on?
example:
Code:
Detect Unit
Events
Unit - A unit enters (Playable map area)
Conditions
((Entering unit) is A Hero) Equal to False
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
showdamagecount equal to 100
Then - Actions
Set showdamagetrigs = showdamagetrigs + 1
Set showdamagecount = 0
Else - Actions
Set showdamagecount = showdamagecount + 1
Trigger - Add to Show Damages[showdamagetrigs] the event (Unit - (Triggering unit) Takes damage)