Home   Help Search Login Register  

Author Topic: SetWPPos giving me trouble  (Read 1182 times)

0 Members and 1 Guest are viewing this topic.

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
SetWPPos giving me trouble
« on: 28 Jan 2008, 15:34:08 »
Hey guys,

Here's the beef:
1) the squad leader of a group has the init code: "MatSqd1 = group this"
2) I have a trigger that when activated does: "[MatSqd1,1] setWPPos GetPos AmmoTruck"

The squad has three move waypoints and I thought those commands would move one of the waypoints (the first or second) to the position of AmmoTruck but it doesn't seem to do anything  >:(

I'm using ArmA vanilla 1.08. What am I doing wrong?

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: SetWPPos giving me trouble
« Reply #1 on: 28 Jan 2008, 16:18:57 »
That will change the position of your first waypoint, but I understand that this happens once the group is already moving to its first waypoint. Havent tested it, but probably moving waypoints has no effect if the waypoint being moved is the current waypoint of the group.
If this happens, you might try the following for the activation code of the trigger:

Code: [Select]
MatSqd1 lockWP true;MatSqd1 move getPos vehicle leader MatSqd1;[MatSqd1,1] setWPPos GetPos AmmoTruck;MatSqd1 lockWP false

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: SetWPPos giving me trouble
« Reply #2 on: 28 Jan 2008, 18:38:55 »
Actually, you just need to re-move it.

Code: [Select]
[MatSqd1,1] setWPPos GetPos AmmoTruck;
[MatSqd1,1] setWPPos GetPos AmmoTruck;

That should do it. Why? Beats the hell out of me. Try Mandoble's too if you want :)

Wolfrug out.

"When 900 years YOU reach, look as good you will not!"

Offline C0LDSt33L

  • Members
  • *
  • Member of the SotM Team
Re: SetWPPos giving me trouble
« Reply #3 on: 29 Jan 2008, 22:30:53 »
Good advice guys. I worked your ideas into the script, rehashed it a bit and it's working now  :D