Page 1 of 1

script.StopBuilding() Is called constantly... What the hell? Why?

Posted: 16 Sep 2016, 10:47
by Forboding Angel
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.

Re: script.StopBuilding() Is called constantly... What the hell? Why?

Posted: 16 Sep 2016, 18:55
by FLOZi
Weird, was it resource-stalling?

Re: script.StopBuilding() Is called constantly... What the hell? Why?

Posted: 16 Sep 2016, 20:08
by Forboding Angel
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?