Home   Help Search Login Register  

Author Topic: Stop, DoStop and Stopped  (Read 601 times)

0 Members and 1 Guest are viewing this topic.

Unnamed

  • Guest
Stop, DoStop and Stopped
« on: 03 Sep 2003, 08:43:03 »
Hi,

I'm trying to check when an AI unit has been given a command to Halt.

"_Soldier Stop True" and "Stopped _Soldier" both work with each other, but DoStop is not recognized by the Stopped command.

It looks as though halting a unit via the move menu is the same as DoStop as it's, not recognized by the Stopped command either.

Is this a bug, oversight from when the Stop command was superseded (See ComRef), or is there another command?

Either way it's thrown a bloody big spanner into the works, as DoStop appears to be the command everybody uses in a units Init field, when they want them to stay still.

Thanks

P.S None of the Stop commands are recognised by UnitReady
« Last Edit: 03 Sep 2003, 10:51:09 by Unnamed »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Stop, DoStop and Stopped
« Reply #1 on: 03 Sep 2003, 12:14:26 »
hmm - you better read the commandref exactly again,

All you were saying is already mentioned in there.
It's even that clear, that i don't wanna copy/paste it here.

Btw - i'm talking about the official comref:
http://www.flashpoint1985.com/docs/comref_102002/data/comref.html

But it's also mentioned same way in the editors depot comref, as it's
just taken from the official one.

~S~ CD
« Last Edit: 03 Sep 2003, 12:17:58 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Zayfod

  • ECP Team
  • *
  • Llama, softest natural fibre in the world.
Re:Stop, DoStop and Stopped
« Reply #2 on: 03 Sep 2003, 12:46:21 »
U could try getting his x and y vel. If both are zero then he aint goin nowhere.

? (velocity _unit select 0 == 0) and (velocity _unit select 1 == 0): unit_has_stopped = true


maybe u would wanna check it again after say 3 seconds just to be sure hes actually properly halted.

Zay
"I have come here to kick ass and chew bubble gum......an I'm all outta bubble gum!"

Unnamed

  • Guest
Re:Stop, DoStop and Stopped
« Reply #3 on: 03 Sep 2003, 14:21:52 »
Quote
All you were saying is already mentioned in there. It's even that clear, that i don't wanna copy/paste it here.
Yeah, I forgot the bit about DisableAI. Although I do feel it's safe to say, I'm probably not the only one to be left feeling a bit dizzy, after an OFP scripting session  :-[

Still can't get my head around the fact that they can provide a command to set a property, and not provide the reverse command to check the same property. But even if I state the obvious, the problem still remains the same :)

Quote
U could try getting his x and y vel. If both are zero then he aint goin nowhere.
? (velocity _unit select 0 == 0) and (velocity _unit select 1 == 0): unit_has_stopped = true

Good point, I will try Velocity, thanks.

I did try and check using speed, perhaps velocity is better suited, some commands appear to operate on different levels.

Due to the timing of what I'm trying to do. Checking if the AI has been given a move order while using Binoculars in a loop, and ensuring an option in the action menu is not displayed when moving, or when using binoculars, it kind of screwed up. One problem being, when you pull out the Binoculars while standing still, there is a brief increase in speed.

Hmm...I cant really explain it very well without typing out something similar to War and Peace, plus I suspect I have wasted to much of some peoples time already :D

I may have to do as you suggested and write some sort of routine, to monitor small changes in movement. It's pretty conveluted as it stands now, and I've been messing about with it to much, for to long. I probably need to start from scratch again.

It would have been a whole lot simpler, if UnitReady triggered when a unit was told to stop what it was doing.

Cheers
« Last Edit: 03 Sep 2003, 14:26:25 by Unnamed »

Unnamed

  • Guest
Re:Stop, DoStop and Stopped
« Reply #4 on: 04 Sep 2003, 13:23:30 »
There is something going on, if you have a unit displaying any of the following from the Move menu:

Stop   : 6 Stop
Wait   : 7 Wait For Me
Hide   : 8 Find Cover

You cant use CommandMove in a script. The unit confirms the order, but never moves to the new location. Move and DoMove dont work either?

The only way to get him moving, as far as I know, is give the AI the move order by left clicking?

Perhaps you can with waypoints? But that wont help me :(

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Stop, DoStop and Stopped
« Reply #5 on: 04 Sep 2003, 16:01:16 »
Quote
The only way to get him moving, as far as I know, is give the AI the move order by left clicking?

Return to formation also works


You could try doFollow somebody in a script, to get back
in control of the unit by your script.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Unnamed

  • Guest
Re:Stop, DoStop and Stopped
« Reply #6 on: 04 Sep 2003, 20:45:29 »
I can get around the DoStop command if its used in the Init field, by changing the status to ready when I call my script:

Soldier1 DoMove (GetPos Soldier1)

But none of the script based commands work when the Halt order is given via the Move menu. It's annoying but not fatal.

I did try the ones you suggested but no joy, although I'm not 100% sure I did the formation script commands properly. Commandfollow is the scripting equivalent to Return To Formation?

Return to formation from the move menu does break the halt command, but that's the exception, things like flank left e.t.c don't.

Cheers