- Joined
- Nov 18, 2007
- Messages
- 48
so, I have a lot of generic unit events for manipulating items, spells, deaths and attacks. using JASS (converted from GUI)
* Some of these triggers have conditions, some have if then else and some have both.
* Some of these triggers have complex conditions.
What's the most efficient way of handling these generic triggers, should I just merge them all into a single trigger with just if then else or make simple conditions and put them in the conditions part.
for example I have a lot of triggers that affect 3 or 4 unit types when they die for example something like this:
should I just make 1 trigger per unit type and just use conditions instead of if then else ?
also I have a lot of triggers, should I merge them all into the same trigger?
I want to optimize the performance but I don't know the best way to proceed, I have removed a lot of memory leaks but there is still a lot of inefficient code.
(btw using an optimizer + some scripts I made I have optimized the script a lot so it isn't as bad as the stuff you get from converting from gui to jass)
* Some of these triggers have conditions, some have if then else and some have both.
* Some of these triggers have complex conditions.
What's the most efficient way of handling these generic triggers, should I just merge them all into a single trigger with just if then else or make simple conditions and put them in the conditions part.
for example I have a lot of triggers that affect 3 or 4 unit types when they die for example something like this:
-
Untitled Trigger 002 Copy Copy
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Footman
-
(Unit-type of (Triggering unit)) Equal to Knight
-
(Unit-type of (Triggering unit)) Equal to Rifleman
-
-
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Unit-type of (Triggering unit)) Equal to Footman
-
(Unit-type of (Triggering unit)) Equal to Rifleman
-
(Unit-type of (Triggering unit)) Equal to Knight
-
-
-
-
Then - Actions
-
Unit - Set life of (Killing unit) to 5.00
-
-
Else - Actions
-
-
-
should I just make 1 trigger per unit type and just use conditions instead of if then else ?
also I have a lot of triggers, should I merge them all into the same trigger?
I want to optimize the performance but I don't know the best way to proceed, I have removed a lot of memory leaks but there is still a lot of inefficient code.
(btw using an optimizer + some scripts I made I have optimized the script a lot so it isn't as bad as the stuff you get from converting from gui to jass)