Home   Help Search Login Register  

Author Topic: Create Waypoint  (Read 1528 times)

0 Members and 1 Guest are viewing this topic.

Offline Mad Pup

  • One Who Asks A Lot.
  • Members
  • *
  • OFPEC Is Awesome
Create Waypoint
« on: 12 May 2010, 21:19:47 »
Hi OFPEC, I have a question about waypoints. Is there a way to create, and destroy waypoints for people, in scripts? Or maybe have travel to a certain gamelogic, or object?

Thanks!
~MadPup~  :cool2:
"The object of war is not to die for your country, but to make the other poor bastard die for his" - General Patton
[SH]MadPup
[SH]Squad

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re: Create Waypoint
« Reply #1 on: 12 May 2010, 22:42:49 »
You can use the doMove or Move commands. The Move command will make a group move and the doMove command will make an individual unit move, if the unit is the leader, the group will end up following him. The formats are like this:

unit doMove [x,y]
group Move [x,y]

where [x,y] is the x and y map possitions, unit is an individual unit and group is the name of a group.

If you want a unit or group to move to a reference object substitute [x,y] with getPos obj; where obj is the name of the object you want them to move toward.

You cannot destroy editor placed waypoints, but you can use group lockWP true or group lockWP false.

If a unit or group already has editor waypoints that you want them to ignor use the group LockWP true command before you issue the Move or DoMove command. If you want them to resume following existing waypoints then use group LockWP false.

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Create Waypoint
« Reply #2 on: 13 May 2010, 06:02:52 »
In OFP, it was not implemented. BUT, you can set way points at different locations by using the....
Code: [Select]
[groupOne, 1] setWPPos [x,y] command. By this you can have "MOVE" waypoints set in new locations. You can utilize the cycle waypoint with a switch trigger and have one group, patrol in hundreds of different locations with only a few waypoints. It takes some effort to grab positions to use but is a very effective way of using only a few groups to populate many bases with similar patrol routes. There are always workarounds, it just depends on how creative you can be AND how much time you're willing to invest in it.

Offline Mad Pup

  • One Who Asks A Lot.
  • Members
  • *
  • OFPEC Is Awesome
Re: Create Waypoint
« Reply #3 on: 27 May 2010, 01:43:01 »
Okay, I see, I've got to move the waypoint, OKAY  :yes:, Another queston: is there a way to tell the cordinates of where I am standing, in a hint form, or something?

Thanks,

~Mad Pup~  :cool2:
"The object of war is not to die for your country, but to make the other poor bastard die for his" - General Patton
[SH]MadPup
[SH]Squad

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Create Waypoint
« Reply #4 on: 27 May 2010, 04:40:18 »
hint format ["%1", getpos player]

For each additional form of information you add a percent and the command such as...

hint format ["%1""%2", getpos player, getdir player]



Offline Mad Pup

  • One Who Asks A Lot.
  • Members
  • *
  • OFPEC Is Awesome
Re: Create Waypoint
« Reply #5 on: 27 May 2010, 21:22:21 »
AHH I see, thanks savedbygrace! Much appreciated!  :good:

~Mad Pup~  :cool2:
"The object of war is not to die for your country, but to make the other poor bastard die for his" - General Patton
[SH]MadPup
[SH]Squad