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 » 17 Mar 2013, 13:29

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?
0 x

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: Units not resuming orders after beeing movecontrolled

Post by knorke » 17 Mar 2013, 14:43

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, {}, {})
0 x

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

Re: Units not resuming orders after beeing movecontrolled

Post by Erik » 17 Mar 2013, 15:08

Thanks that helps.
0 x

Google_Frog
Moderator
Posts: 2435
Joined: 12 Oct 2007, 09:24

Re: Units not resuming orders after beeing movecontrolled

Post by Google_Frog » 18 Mar 2013, 08:40

I do WAITWAIT too. Maybe it should be on the wiki.
0 x

User avatar
Silentwings
Moderator
Posts: 3586
Joined: 25 Oct 2008, 00:23

Re: Units not resuming orders after beeing movecontrolled

Post by Silentwings » 18 Mar 2013, 15:45

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

Post Reply

Return to “Game Development”