Page 1 of 1

Posted: Sat Jul 30, 2005 4:16 pm
by Sam The Butcher
On the map Im working on. At a point in the game the player loses control of their units and the units have scripted actions. I used the ignore user commands flag (so casualties would still count). The weird thing is.

Edit: Actually it is if I move the unit at any point in the game. If I dont give the unit any commands, and just wait until the time that the player loses control and the scripted actions are supposed to take over. Everything works fine. If at any point before that I move the unit the scripted actions dont work after player loses control. Any ideas why it is like that, and how I can get it to work? I want the script to take over the units movements, but I still want it to count if the unit dies. It works as long as I never move the unit when it is still under players control.
Thanks




Edited By Sam The Butcher on 1122763883

Posted: Sun Jul 31, 2005 8:17 am
by haravikk
When taking control of a unit you should always have two flags, the "Ignores user control" flag which you set to true, and the "User received control" flag which you set to false.
If this still doesn't work (there are certain things that can cause this), then you should make sure to stop your units before scripting them to do something, this can be done with a general action to stop them, on success this will trigger the actions that you DO want, just make sure there is a tiny delay after stopping the units and starting them moving again.

Posted: Mon Aug 01, 2005 6:53 am
by Sam The Butcher
Thanks haravikk thats what it was. I had thought just the "ignores users flag" set to false would be enough. It is working now.