OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Killzone on 19 Dec 2005, 17:41:44
-
Hi I am using a script that allows me to order men to go where I want them using mapclick. my problem is this works fine and the script waits for me to click the map (Which is what I want) but it only waits the 1st time I use the script. If I call on it a second time it does not wait for me to click the map. Why is it doing this and am I using the wrong map click? Here is the script.
_____________________________________
Hint "Click Map For Location Request"
onMapSingleClick {Marker setPos _pos; variable1=true; onMapSingleClick {}}
@variable1
player sidechat "Roger that. Machine Gunner moving out."
~1
Soldier domove [getpos Marker select 0,getpos Marker select 1,0]
____________________________________
Thanks for the help
-
Try adding the following at the end of the script
variable1=false
So that the next time the script is run it waits at the
@ variable1 line
EDIT:
In fact you could put the line anywhere after the @ line or before the onMapSingleClick line
-
small question concerning the above script.
to be precise, its about the line that reads as follow:
Soldier domove [getpos Marker select 0,getpos Marker select 1,0]
---------------------------------------------------------------------------
how would it need to be to give a group the domove command? I've tried using the group's name (group1) in place of "Soldier" but i get an error message.
-
Read the comref. Always read the comref. ;)
domove, as you've discovered, does not take a group as an argument. The equivalent command for a group is move.