OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: CopyrightPhilly 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
-
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.
-
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
-
Marker named "markerOne"
BMP named "vBMP1"
vBMP1 doMove getMarkerPos "markerOne"
or, with a Game Logic or other non-marker object on the map:
vBMP1 doMove getpos glOne
where glOne is any object name assigned in the editor.
To do multiple moves,
vBMP1 doMove getpos glOne
@unitReady vBMP1
vBMP1 doMove getpos glTwo
@unitReady vBMP1
etc....
Make sense?
-
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.
-
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
-
Thanks Guys, Got It Sorted Now...
They Both Work 100% For Me
Cheers, Philly
-
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. :)