Home   Help Search Login Register  

Author Topic: Adding A Waypoint By Scipt  (Read 696 times)

0 Members and 1 Guest are viewing this topic.

CopyrightPhilly

  • Guest
Adding A Waypoint By Scipt
« on: 29 Apr 2004, 03:26:09 »
dose anyone know how to add a waypoint by script?

I'm wanting the script to create a BMP then to give it a way point.

I have made the script so that it makes the BMP so all i need now is the part to tell it where to go.

i have had a look round the forms but could not see nothing so i would be gratful as normal for anyhelp

cheers
Philly

Kammak

  • Guest
Re:Adding A Waypoint By Scipt
« Reply #1 on: 29 Apr 2004, 04:22:25 »
AKAIK there is no way to create a waypoint...you have to use doMoves, @unitReady, doMove, etc...through scripting

If there IS a way to create waypoints I would love to know about it too.

CopyrightPhilly

  • Guest
Re:Adding A Waypoint By Scipt
« Reply #2 on: 29 Apr 2004, 04:28:32 »
Yo Kammak,

could u explane how to use the doMoves commands for me, i only want it to move to one place and thats it...

i could get it to move to a marker..

cheers, Philly

Kammak

  • Guest
Re:Adding A Waypoint By Scipt
« Reply #3 on: 29 Apr 2004, 05:33:35 »
Marker named "markerOne"
BMP named "vBMP1"

Code: [Select]
vBMP1 doMove getMarkerPos "markerOne"

or, with a Game Logic or other non-marker object on the map:

Code: [Select]
vBMP1 doMove getpos glOne

where glOne is any object name assigned in the editor.

To do multiple moves,
Code: [Select]
vBMP1 doMove getpos glOne
@unitReady vBMP1
vBMP1 doMove getpos glTwo
@unitReady vBMP1
etc....

Make sense?


Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Adding A Waypoint By Scipt
« Reply #4 on: 29 Apr 2004, 07:11:42 »
Actually, you can make a waypoint, but only of type "move" (not seek&destroy, etc).

Instead of using the "domove" command, you should use the "move" command. It's syntax is the same as the "domove" command:

group or unit move position

"Domove" only moves a single unit in a group, whereas "move" actually creates a 'move' waypoint for the group. It doesn't matter if there is only one unit in the group, but if you add more units to a group later, you're going to need to switch stuff anyway.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Kammak

  • Guest
Re:Adding A Waypoint By Scipt
« Reply #5 on: 29 Apr 2004, 07:37:14 »
Ah!  Good to know, thanks General Barron.  I've been doing the {_x doMove pos} foreach units group .... thing all the time.  My eyes have completely skipped over the "Move" command in the reference until now.  Time to redo some scripts!  :)

Thanks

CopyrightPhilly

  • Guest
Re:Adding A Waypoint By Scipt
« Reply #6 on: 29 Apr 2004, 20:43:18 »
Thanks Guys, Got It Sorted Now...

They Both Work 100% For Me

Cheers, Philly
« Last Edit: 29 Apr 2004, 20:43:33 by CopyrightPhilly »

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Adding A Waypoint By Scipt
« Reply #7 on: 02 May 2004, 07:05:01 »
Ah!  Good to know, thanks General Barron.  I've been doing the {_x doMove pos} foreach units group .... thing all the time.  My eyes have completely skipped over the "Move" command in the reference until now.  Time to redo some scripts!  :)

Thanks

Lol... I know the feeling. I used to be in the exact same boat as you. :)
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!