Home   Help Search Login Register  

Author Topic: setWPpos...  (Read 1521 times)

0 Members and 1 Guest are viewing this topic.

TERA_Forrest

  • Guest
setWPpos...
« 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

Offline Wadmann

  • OFPEC Patron
  • ****
  • I'm the next evolutionary step after a llama!
Re:setWPpos...
« Reply #1 on: 16 Nov 2005, 02:00:38 »
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:

Code: [Select]
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:

Code: [Select]
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


Check out my Camouflage Collection! New items added 31 July 2005.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:setWPpos...
« Reply #2 on: 16 Nov 2005, 02:20:28 »
Quote
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.
Plenty of reviewed ArmA missions for you to play

Offline Pilot

  • Contributing Member
  • **
Re:setWPpos...
« Reply #3 on: 16 Nov 2005, 02:23:10 »
Getmarkerpos must be a string:
[soldiers,1] setwppos getmarkerpos "pos1"
[soldiers,2] setwppos getmarkerpos "pos2"
[soldiers,3] setwppos getmarkerpos "pos3"

-Pilot

TERA_Forrest

  • Guest
Re:setWPpos...
« Reply #4 on: 16 Nov 2005, 17:45:51 »
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