OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: sharkattack 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 ....
-
I think the second waypoint's index should be 1, not 0.. :dunno:
wp = zulu addWaypoint [ position boat, 1]
-
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:
-
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 (http://community.bistudio.com/wiki/Waypoint) 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.
-
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 ?