• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Can someone Tell me what i did wrong in this spell ? I'm just started making one so be easy on me

Level 2
Joined
Jun 29, 2018
Messages
5
1742335185386.png
 
Level 45
Joined
Feb 27, 2007
Messages
5,578
All of your custom script stuff is entirely pointless for two reasons:

1. TSA (wait) will not sleep 0.03s on every iteration of the loop. The minimum is something like 0.27s so that loop will take about 10x longer to complete than you think it does. People use timers or periodic triggers for this sort of thing: Visualize: Dynamic Indexing

2. You stored a bunch of information in global variables before your cs wait loop bologna, and then refer to that data multiple times after multiple further waits. Even though your loop counter variable (i) is properly insulated from being overwritten by multiple simultaneous casts… none of your other variables are. This spell will break completely if multiple casts overlap temporally (not positionally).
 
Top