Home   Help Search Login Register  

Author Topic: more trouble with waypoints ..  (Read 1826 times)

0 Members and 1 Guest are viewing this topic.

Offline sharkattack

  • Former Staff
  • ****
more trouble with waypoints ..
« on: 27 Feb 2007, 22:39:14 »
hi ..
have been trying to add a (2nd) waypoint to a group using the old ofp codes
 
wp = zulu addWaypoint [ position boat, 0]
(have also tried  wp1 .. wp2.. wp3 ..)

zulu is name of my group  boat is the name of unit i would like the waypoint to aim for ..

cant get it working  no error message  just dosnt add waypoint to group ..

what am i doing wrong  ... had previous trouble trying to move waypoint .. ( still unresolved)

sorry to be a pain ....

"HOLY SARDINE" - see Shark-Attack meet his match

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: more trouble with waypoints ..
« Reply #1 on: 28 Feb 2007, 17:57:29 »
I think the second waypoint's index should be 1, not 0..  :dunno:
Code: [Select]
wp = zulu addWaypoint [ position boat, 1]
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline sharkattack

  • Former Staff
  • ****
Re: more trouble with waypoints ..
« Reply #2 on: 28 Feb 2007, 18:38:15 »
ok mate thanx ill try it ..
the impression i got was that 0 was the position in relation to the boat .. must of read it wrong ..
thanx again .. will update and let you know ..�  :)

*EDIT
tried with
wp = zulu addWaypoint [ position boat, 1]

same as before  no error message  but no new waypoint for zulu ..

just let me give some more info to be sure i have set up right ..

briefing
zulu is tasked with killing enemy officer  they start with only one waypoint ..
when target has been eliminated or if he escapes  i would like a second wp to be created at the location of the boat they used for infil .. the boat could end up anywhere ..  player  has random insertion point

obviously i have triggers set to fire when certain conditions are met ( which they do . i get the hints i added for testing ) ..
am i right to call the new wp from a trigger ??  ???

or if anyone could suggest a work around       :good:
« Last Edit: 28 Feb 2007, 19:48:57 by shark attack »
"HOLY SARDINE" - see Shark-Attack meet his match

Offline Cheetah

  • Former Staff
  • ****
Re: more trouble with waypoints ..
« Reply #3 on: 28 Feb 2007, 20:24:34 »
A new waypoint is made after executing the following code:
wp = group player addWaypoint [position mike,1];

Where the player is named "player" and another soldier (not grouped with the player) is named "mike".
If I start the mission, I see the new waypoint being created, which probably means that the AI doesn't WALK towards their waypoint.

Note: it doesn't matter if I use 1 or 0 as the waypoint index. But the wiki states that index 0 is always a waypoint created at the soldier's starting position.
Note1: as you have already created a waypoint, I tested if the waypoint gets created when you use 0,1,2,3 etc and in what order waypoints will be created. The weird thing is, you can use 0 or 5, the result is that the waypoint you create is the final waypoint. But, they are always there, it's just that units don't go to them.
Note2: Units DO move to a newly created waypoint if there are editor waypoints they have to reach first, but they must not have reached them. If they stop, they stay still. Don't know how to get them to make their way towards a "hand-made" waypoint.
Note3: Still haven't found a command that let's the AI walk to their next WP.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline sharkattack

  • Former Staff
  • ****
Re: more trouble with waypoints ..
« Reply #4 on: 28 Feb 2007, 20:34:55 »
thanx a million cheetah.. ;)
will try asap ..  will update ... :good:

top class cheetah .. you the man !
much obliged mate also solves  my problem with move waypoint
was sure i had to enter group name not player name
thanx again mate :)
ps
dont suppose you know how to set the description/text displayed  for added wp ?
« Last Edit: 13 Mar 2007, 18:33:02 by shark attack »
"HOLY SARDINE" - see Shark-Attack meet his match