Units not resuming orders after beeing movecontrolled

Units not resuming orders after beeing movecontrolled

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Units not resuming orders after beeing movecontrolled

Post by Erik »

I'm currently writing a factory that movecontrols units out to avoid them getting stuck inside(that part works) but there is one problem: They don't move to the waypoint (or do anything else i tell them to) despite it being shown on selecting them.
This behaviour is unexpected, annoying and completely breaks my AI, anyone know a fix?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Units not resuming orders after beeing movecontrolled

Post by knorke »

I give two wait commands, for some reason that makes the unit move again:

Code: Select all

Spring.MoveCtrl.Disable (unitID)
	Spring.GiveOrderToUnit(unitID, CMD.WAIT, {}, {})
	Spring.GiveOrderToUnit(unitID, CMD.WAIT, {}, {})
User avatar
Erik
Posts: 283
Joined: 20 Aug 2009, 20:49

Re: Units not resuming orders after beeing movecontrolled

Post by Erik »

Thanks that helps.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Units not resuming orders after beeing movecontrolled

Post by Google_Frog »

I do WAITWAIT too. Maybe it should be on the wiki.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Units not resuming orders after beeing movecontrolled

Post by Silentwings »

Can I ask if anyone has tested not using the WAITWAIT trick with 92.0+?
Post Reply

Return to “Game Development”