🏆 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!
🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!
Create a burning eye on the ground. Every one sec a fire geyser apear in the middle of the eye and deal some damage in a certain Aoe during 5 sec:
Level 1: 50 damage per geyser and aoe of 250. Level 2: 60 damage per geyser and aoe of 300. Level 3: 70 damage per geyser and aoe of 350.
Burning Eye Init
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Burning Eye
Actions
-------- This is a part of MUI and recycling index --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
B Equal to 0
Then - Actions
-------- Opening periodic trigger , really important --------
Set BEDamageGroup = (Units within BEAoe[A] of BELocGuy[A] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and (((Matching unit) belongs to an enemy of BEPlayer[A]) Equal to True))))
Unit Group - Pick every unit in BEDamageGroup and do (Actions)
Loop - Actions
-------- Here we store the picked unit into a variable --------
Set BEGeyserPoint[BEIndex[2]] = (Position of BEGeyser[BEIndex[2]])
This leaks as it is run in a loop 10 times under BEIndex[2] being constant (not changing) and the asigned location is not removed until the end of the loop, resulting in 9 location leaks. Every handle you create must be destroyed if you no longer need it (or it no longer affects the game).
Why are you using static indicies so much (eg BEIndex[2]])... The whole point of arrays are to provide dynamic indicies so you defeat their purpose using static ones. Rather just use a normal variable in this situation as it is faster to reference (no offset finding required etc).
This system does not recycle indexes, it only just restricts their range to a seemingly random number.
Do you really run code every one second? What is the point of doing that if no spells are active, you tell me.
Obviously as it is GUI it leaks handle indicies and is not very efficent but you can not be blamed for that.
When destroying an instance, if that was the last active instance disable the timer / trigger. When making an instance if it is the only active instance (must be 0 before) thus enable the timer / trigger.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.