So this is the script: http://pastebin.com/nDQZRYsc
The problem is that I set an echo on stopbuilding to figure out when it is called, and it is called constantly! That doesn't make any sense, because that is what I'm supposed to use to know when the unit is done building. I can't restore the unit's position properly if I have no idea when it is done building.
You would think that the if statement around building = false would do the trick, but no building must be getting triggered on and off constantly.
This is dumb... how the heck am I supposed to know when the unit is finished building and then reset the animation? This is directly from the wiki.
https://springrts.com/wiki/Animation:LuaExamples
and
https://springrts.com/wiki/Animation-LuaCallins
Interestingly enough, buildfx works properly. I was desperate and so I even tried a while false loop on resetting the animation which of course didn't work, but I would be remiss if I didn't try absolutely everything.
script.StopBuilding() Is called constantly... What the hell? Why?
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: script.StopBuilding() Is called constantly... What the hell? Why?
Weird, was it resource-stalling?
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: script.StopBuilding() Is called constantly... What the hell? Why?
No, and it was constantly getting called while it wasn't even building. I had it echoing the string twice per second about. That's another weird shit... Twice? Why twice?