OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Berghoff on 20 Feb 2004, 15:32:49
-
Hi all,
I need to know something.
Here is my question:
How do you move a object (Empty Tank in my case) to a position where a marker in on the map ?
So, the empty tank needs to teleport to a position (marker) when a objective is completed.
:) Hope some1 can help.
-
tank1 setPos getMarkerPos "tankMarker1"
or
tank1 setPos getPos GL_1
-
tank1 setPos getMarkerPos "tankMarker1"
or
tank1 setPos getPos GL_1
Perfect thx, now to add a little fun, I need to know the following:
I have 5 markers where to tank can teleport towards, and a script needs to select 1 of those 5 location at random. How do I do that ? ;)
-
Something like this, this is just a sketch not a script
_rand = random 6
? _rand < 1: tank1 setpos getpos GL1
? _rand < 2: tank1 setpos getpos GL2
etc