• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

what can you guys tell me about this kind of spell

Status
Not open for further replies.
Level 6
Joined
Jul 21, 2011
Messages
139
  • For each (Integer A) from 1 to 20, do (Actions)
    • Bucle: Acciones
      • Set magicianloc2 = (magicianloc offset by (50.00 x (Real((Integer A)))) towards (Facing of magiciancaster) degrees)
      • Unidad - Create 1 Dummy (Effect 3) for (Owner of magiciancaster) at magicianloc2 facing (Facing of magiciancaster) degrees
      • Unidad - Add a 0.25 second Genérico expiration timer to (Last created unit)
      • Set magiciangroup = (Units within 300.00 of magicianloc2 matching (((Matching unit) belongs to an enemy of (Owner of magiciancaster)) Igual a True))
      • Grupo de unidad - Pick every unit in magiciangroup and do (Actions)
        • Bucle: Acciones
          • Unidad - Cause magiciancaster to damage (Picked unit), dealing 50.00 damage of attack type Conjuros and damage type Desconocido
      • Custom script: call DestroyGroup(udg_magiciangroup)
      • Custom script: call RemoveLocation(udg_magicianloc2)
do they decrease map performance/cause lag?

as you can see the spell is doing everything at the same time unlike similar spells that use a 0.05 periodic event for example
 
Level 6
Joined
Jul 21, 2011
Messages
139
you guys think the unit creation takes more performance than the whole creating 10-20 groups and calculating units within 200-300?

"integer A is also less efficient than making and using ur own integer"
how did you find out about that? how does one calculate that?
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
@caleman
We run some tests, some of us using Memory Usage or Performance in he Task Manager provided by OS - which in this case, this method is negligible.
This method can be used to test "trigger leaking" and when leak happens, you will see Memory Usage will increase as time goes on.
The increase is gradually, this means something wrong.
If it increases and decreases dynamically without having significant change, this is normal as handle is created and destroyed in the game dynamically.

Also, Integer A/B may bugged out if it collides with another trigger that occurs at the same time using the same, Integer A/B.
And if this happens, the counter to these integer will mess up and might mess up your calculation on a specific trigger.

That is why we use Integer Variable, this will vary for each trigger, and for each usage.
Usually, people just create just one Integer Variable and use it globally for all triggers, they do not collide however.
 
Status
Not open for further replies.
Top