OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: TERA_Forrest on 15 Nov 2005, 22:12:12
-
Thought I would post here because I need this for a multi-player map.
I've tried everything that I can think of to get some wp to move but cannot get it to work. This is what I've done:
1. Set a group of soldiers and in the leaders "init line" i've put...
soldiers group this
2. created 3 wp's for the group
-move
-move
-seek&destroy
3. created three markers named...
-pos1
-pos2
-pos3
4. in wp 1 in the activation I have...
-move
5. made a trigger that activates on "alpha" and in the activation field i have...
-[] exec "move.sqs"
6. move.sqs has this in it....
move=true
[soldiers,1] setwppos getmarkerpos pos1
[soldiers,2] setwppos getmarkerpos pos2
[soldiers,3] setwppos getmarkerpos pos3
exit
7. ERRORS!
-not getting any errors from OFP
-the group continues to move on the wp's that I've set but the wp's do not move to the markers
8. this is what I thought I was doing...
[name of group, coorasponding wp number] setwppos getmarkerpos markername
is that right?
Now i've been searching these forums and the BIS forums for 2 1/2 hours, i've given up in the hope that somone will plz help me out with this.
thanks in advance
-
I am taking a stab at this until one of the "pros" drops by as I am not a good scripter, much less a MP scripter.
First thing that looks wrong to me is the init line. Try:
soldiers = group this
I am not sure if it makes a difference, but that is how I name my groups and I rarely have a problem with that part of editing.
Secondly, as it is for MP, I think that you have to declare your variable so that all will recognize them. When "move" is made true, add the "publicvariable" command like so:
move; publicVariable "move"
If these tips do not fix the problem, then you may have to wait until a more seasoned scripter drops by to give you a real answer.
Wadmann
-
move
This is a command. Never use commands as variables: application behaviour is "undefined".
And check the syntax of your getMarkerPos command, it looks wrong but I'm not sure why.
-
Getmarkerpos must be a string:
[soldiers,1] setwppos getmarkerpos "pos1"
[soldiers,2] setwppos getmarkerpos "pos2"
[soldiers,3] setwppos getmarkerpos "pos3"
-Pilot
-
hey thanks allot guys, I got it working by putting the "" around the marker position. Somthing else I noticed is that [soldiers,1] doesn't coorispond to wp1 it coorisponds to wp0 wich i thought was strange but oh well.
one more question...
if I add this to a script, does it make it multi-player friendly?
?!(local server):exit