PurgeandFire
zxcvmkgdfg
- Reaction score
- 509
I seem to have some problems with dummy unit recycling.
I have a spell which basically starts out with units revolving around the caster. After 5 seconds are up it stops. (It does more if units are in range, but this is just the part I'm trying to focus on)
Since I shouldn't create/remove units every time I cast the spell, I tried the whole "ShowUnit()" recycling method. The problem is, is that these dummies have locust. When I use the spell, it works fine the first time, but the second time I am able to select the dummies. I tried adding locust after the unit was displayed, and I also tried adding the units after they are hidden, but it didn't work...
If needed, I can post the code. But it is most likely a mess since I'm not up-to-date on the most efficient way to code, and it with recycling isn't even functional at the moment. (The one without dummy recycling works fine)
I have a spell which basically starts out with units revolving around the caster. After 5 seconds are up it stops. (It does more if units are in range, but this is just the part I'm trying to focus on)
Since I shouldn't create/remove units every time I cast the spell, I tried the whole "ShowUnit()" recycling method. The problem is, is that these dummies have locust. When I use the spell, it works fine the first time, but the second time I am able to select the dummies. I tried adding locust after the unit was displayed, and I also tried adding the units after they are hidden, but it didn't work...
If needed, I can post the code. But it is most likely a mess since I'm not up-to-date on the most efficient way to code, and it with recycling isn't even functional at the moment. (The one without dummy recycling works fine)