Home   Help Search Login Register  

Author Topic: Move and DoMove  (Read 730 times)

0 Members and 1 Guest are viewing this topic.

SheepOnMintSauce

  • Guest
Move and DoMove
« on: 31 Aug 2003, 05:25:35 »
I was told by deaddog in another topic, that the 'Move' command shouldn't be used over and over.

Quote
Also, you shouldn't continously use the move command.  It only needs one.

I was wondering if the 'DoMove' command was the same, as I read the 'Move' command set a waypoint, which i figured was the reason why it shouldn't be used over and over. But does 'DoMove' set a waypoint, or is it just a command to move a unit to a position without having to set down a waypoint?


Offline toadlife

  • OFPEC Old Skool
  • Former Staff
  • ****
  • Official OFP Editing Center Toad
    • toadlife.net
Re:Move and DoMove
« Reply #1 on: 31 Aug 2003, 07:31:59 »
I dont know why it shouldn't be used. I've allways used to move command instead of DoMove. the move command make the soldiers pay attention to the their speedmode settings and helicopters will not pay attention to the flyinheigh command if you use domove or commandmove.

I've used the 'move' command hundreds of time in missions with no problems.

 ???

EDIT:  Domove and commandmove are almost the same. They do NOT set a waypoint for the soldier. When you command a soldier to move to a certain spot in the game that's just like using the commandmove/domove command in a script.

"move" on the other hand does set a waypoint for the group. The move command should be given either to a group or to the leader of a group.
« Last Edit: 31 Aug 2003, 07:37:31 by toadlife »
"Whenever you want information on the 'net, don't ask a question; just post a wrong answer." -- Cancer Omega.

deaddog

  • Guest
Re:Move and DoMove
« Reply #2 on: 31 Aug 2003, 15:23:17 »
Quote
I was told by deaddog in another topic, that the 'Move' command shouldn't be used over and over.

Dude, That's not exactly what I said.  This is:

Quote
_spotter move [getpos _sniper this select 0, getpos _sniper this select 1 + 10]
? not (unitready _spotter) : goto "spot"

Remove the word "this" (getpos _sniper select 0, etc)
Also, you shouldn't continously use the move command.  It only needs one.

Use:

@unitready _spotter

or

_spotter move [getpos _sniper select 0, (getpos _sniper select 1) + 10]  ***note the parenthesis
#wait
~2
?!unitready _spotter:goto "wait"
 


You don't need to use the move command in the way you were trying.  In a loop, no delay.  You only need to order the unit to move once and then wait until it is ready.  It may not hurt anything but it is unnecessary.

I don't understand how you thought that meant you can't use the move command multiple times ::).

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Move and DoMove
« Reply #3 on: 31 Aug 2003, 17:34:29 »
Uh... Sorry to bother this thread but since it seems solved and so I have a Q about the move command that never actually bothered me, but I'm kinda courius.

How "safe" is the move command? When you use WPs the AI never walks exactly at the point. I mostly use the distance command when I'm setting a "chain" move reaction(AI moves to point A, then point B, then C) and then I set the distance 5. This is quite much and could make some trouble if you need more exactly. What do u guys recommend that I put in my distance? Hope you understand this cause I wouldn't if I had read it :P ;D

SheepOnMintSauce

  • Guest
Re:Move and DoMove
« Reply #4 on: 31 Aug 2003, 17:47:22 »
Lol, sorry my mistake.  :P At least, I understand now.

Quote
I don't understand how you thought that meant you can't use the move command multiple times

It was because in that script you put

Quote
Also, you shouldn't continously use the move command.  It only needs one.

That's what got me confused about it, then after reading the command reference it said

Quote
group move pos

Operand types:
group: Object or Group
pos: Array
Type of returned value:
Nothing
Description:
Creates waypoint move on given position (format Position) and makes it actual group waypoint.

Example:
groupOne move getPos player

which confused me even more. But, I think I understand now. Thanks.  :)

deaddog

  • Guest
Re:Move and DoMove
« Reply #5 on: 31 Aug 2003, 18:00:07 »
I think I know what you mean.  You're using the move command to send a group/unit to a point.  When he gets there, you move him to the next point.  Almost like waypoints but all scripted (I think that's what you mean :))

I've done a lot of that and I like to use 15-20 meters with the distance command.  I've seen it where the unit will get close and stop but not be within 10 or so meters from the destination.

One thing I like to do is use a "timeout".  Sometimes units will get into combat and the original move command will be superseded.  They never get to where they are supposed to go and the script never continues.

Example:

Code: [Select]
.
.
.

#move1

_to=time

groupname move destination

#wait
~5
?(time - _to)>300:goto "move1"
?(leader groupname) distance destination > 20:goto "wait"

.
.
.

You can change the 300 (5 minutes) to whatever is suitable.  I like to use this for groups that are doing random searches.  If, for some reason, it takes longer than 5 minutes to get there (combat most likely), the group gets issued the move command again.

Well, that's a bunch of stuff you probably didn't need :)

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:Move and DoMove
« Reply #6 on: 31 Aug 2003, 18:44:08 »
Thx deaddog! :-*

SheepOnMintSauce

  • Guest
Re:Move and DoMove
« Reply #7 on: 01 Sep 2003, 01:25:23 »
Ok to solve this one?

SheepOnMintSauce

  • Guest
Re:Move and DoMove
« Reply #8 on: 01 Sep 2003, 23:19:23 »
Guess so, lol.  ;D