OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Relbik on 25 Mar 2003, 04:35:06

Title: setWPPos command
Post by: Relbik on 25 Mar 2003, 04:35:06
Official Command Reference describes it as this:

[group1, 1] setWPPos getMarkerPos "MarkerOne"

I've had no success in making it do anything, though.

Anyone have experience with this command?

And yes, I do have a group1 and a MarkerOne.
Title: Re:setWPPos command
Post by: Chris Death on 25 Mar 2003, 15:28:49
Never had a problem with the setwppos command.

What are you trying to do?

Are you trying to change the location of the waypoint
while the unit is already walking to the previous location
of this waypoint? This could be your problem then.

You need to make sure, that the unit will start moving to
the waypoint, after you've setwpposse'd it.  ;)

~S~ CD
Title: Re:setWPPos command
Post by: Relbik on 25 Mar 2003, 16:57:43
I've got a group named group1 with 3 WPs:  1st is Move, 2nd is Cycle (positioned at group1's origin), and 3rd is SeekAndDestroy.

In an int.sqs I'm using AddEvent to detect when myguy has fired and exec a heard.sqs.

heard.sqs then reads as follows (with gogo being the trigger sycned with Cycle WP):

[group1,3] setWPos getMarkerPos "Marker1"

gogo=true

exit

Now using other tests, I'm sure the AddEvent is working and gogo is working.  I've also tried changing [group1,3] to [group1,2] or [group1,4].  I've taken the trigger and Cycle WP out completely.  I've still not been able to reposition the SeekAndDestroy WP, though.

Now, I'm just plain out of ideas.  I'm sure it's something dumb now that you've confirmed the command does work.

Thanks for any help.

Title: Re:setWPPos command
Post by: benreeper on 25 Mar 2003, 17:41:23
1st thing, its "setWPPos".

2ndly, are they moving at all?

Ben
Title: Re:setWPPos command
Post by: LinCafe on 25 Mar 2003, 18:26:55
remember that the first WP is number 0 not number 1, number 1 must be the second and so...

I know I know this is obvious, but one day I missed that and I was going crazy for a week!!!

 :P

Title: Re:setWPPos command
Post by: Relbik on 25 Mar 2003, 19:27:01
SetWPPos...that was a typo.  I checked my script to make sure I didn't do the same there.  It's typed right there.

Trying to simplify things, I now just have group1 running around to 5 Move WPs.  The heard.sqs reads:

[group1, 4] setWPPos getMarkerPos "MarkerOne"

exit

Activating the script with radio command.  myguy is located at MarkerOne.  I'm exec the script as soon as group1 reaches the 1st WP (technically this is WP 0, right?).  Now, shouldn't group1 end up with myguy?
Title: Re:setWPPos command
Post by: Relbik on 25 Mar 2003, 19:40:47
Problem Solved!!!

Of all the stupid little things.

When naming group1, I used:

group1= units group this

That was the problem.  Why?  I've no stinking idea!!!  But:

group1= group this

And now it works fine!!!

So many wasted hours!!!

Seriously, though, thanks for all your help.