Issue With Ordering a Command
Posted: 07 Apr 2013, 00:36
I've been working on a custom command for the "locator" unit in my game. What I'm trying to do right now is make it act as the move command. (Head to the coords of the map I click on.)
What I'm confused about is that whenever I call the command, this happens. The unit walks to the same exact area in the upper left area of the map after the game freezes for about 5 seconds.
What works is Spring.Echo() when I call the command.
My infolog after testing is here. Please disregard line 77-154 as they are due to empty files in the directory.
My gadget code is here. I've commented most of it, which hopefully helps understand what I'm trying to do.
I suspect the problem is where I've attempted to create unsynced code in the middle of the commandfallback function, but I'm not sure how else I'd be able to add that just for Spring.GetMouseState.
I'm not sure what to do at this point as I've attempted to fix the code in many different ways.
Any assistance is appreciated.
What I'm confused about is that whenever I call the command, this happens. The unit walks to the same exact area in the upper left area of the map after the game freezes for about 5 seconds.
What works is Spring.Echo() when I call the command.
My infolog after testing is here. Please disregard line 77-154 as they are due to empty files in the directory.
My gadget code is here. I've commented most of it, which hopefully helps understand what I'm trying to do.
I suspect the problem is where I've attempted to create unsynced code in the middle of the commandfallback function, but I'm not sure how else I'd be able to add that just for Spring.GetMouseState.
I'm not sure what to do at this point as I've attempted to fix the code in many different ways.
Any assistance is appreciated.