L
Lloren
Guest
the question is, whish one is faster/better in loading time, exicution time, and map size.
is it better to have one trigger for every dropping creep.....
or have one the runs through an array everytime a unit dies?
is it better to have one trigger for every dropping creep.....
Code:
spider death
Events
Unit - A unit owned by Player 11 (Dark Green) Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Spider
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 0 and 2) Equal to 0
Then - Actions
Item - Create Spider Fang at (Position of (Triggering unit))
Else - Actions
or have one the runs through an array everytime a unit dies?
Code:
spider death Copy
Events
Unit - A unit owned by Player 11 (Dark Green) Dies
Conditions
Actions
For each (Integer A) from 1 to 10, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Triggering unit)) Equal to Creeper[(Integer A)]
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Random integer number between 0 and CreeperDropChance[(Integer A)]) Equal to 0
Then - Actions
Item - Create CreeperDrop[(Integer A)] at (Position of (Triggering unit))
Else - Actions
Else - Actions


