Jump to content
Sign in to follow this  
Op4 BuhBye

DeleteWaypoint Command

Recommended Posts

I cant get this to work. I have the command and [groupname,waypoint#] And I doesn't work. Anyone gotten it to work?

Did a search and found like 900 pages but didnt see anything on exacty this.

Share this post


Link to post
Share on other sites

It works as it should. Tested in 1.07.5157

Share this post


Link to post
Share on other sites

it works as it should.

keep in mind that the position of placement is waypoint 0.

also keep in mind that deleting a waypoint change the wp numbers of the following waypoints. so if you delete waypoint 0, waypoint 1 becomes waypoint 0.

if your mission is linear along 5 waypoints you always delete waypoint 0 after an objective is done.

Share this post


Link to post
Share on other sites

Maybe thats why its not working. I have 10 WPs and I want to delete #7. Can I do this? If not how can I make the WP null?

Share this post


Link to post
Share on other sites

you wanna delete the waypoint #7 at start of mission?? then delete him in the editor tounge2.gif

serious now, see the waypointsnumber as a counter of things left to do, by reaching a objective the numbers change aswell.

if you reach all waypoints including waypoint #5 and want to delete waypoint #7 it wont work, cause its waypoint 2 then.

hope you get what i mean. the number isnt fix, its just a numeration of waypoints left to do. If you want a mission to jump over a waypoint (f.e. from waypoint 7 to waypoint 9) use a variable to set the waypoint #8 to done at the moment you reach waypoint#7.

Share this post


Link to post
Share on other sites

So if I want to delete #7 by west entering a tigger at #6, and #6 is complete. I need to delete WP #0?

Is that what you are saying?

Share this post


Link to post
Share on other sites

deletewaypoint [theteam,0];

is the correct spelling for a named group

to name a group write this in init of groupleader

theteam=group this;

ususally a group is named like this as default

EAST 1-1-A

to find out the numbers of waypoints of a group use this

in a repeatable radio trigger as action

hint format ["damnwaypoints: %1", waypoints theteam]

this will show ingame up left something like this:

[[theteam,0],[theteam,1]]

as far i remember the original 0 waypoint cant be completed ( the position the units enter the map, the invisible waypoint if you wanna call it that) so i deleted him right after the intro, but then i deleted always the 0 waypoint till end of mission. just try around a little. be aware that in a mp mission this command is executed several times. in that case better use a variable as waypoint complete reason.

Share this post


Link to post
Share on other sites

Thanx Scars. I already had the group named and defined. Ill just tinker and find the right one to delete.

Share this post


Link to post
Share on other sites

Dumb question I guess, but I can't find this information anywhere either...

How can you tell, in script, how many waypoints a specific group has?  Will count waypoints _group work?

I'd like to have guys following waypoints until a predefined condition flag is set, then delete their waypoints and create some new ones to make them evecuate once their numbers drop too low.

Maybe the only other way to do this will be to create a brand-new group and make em all join that one with a new bunch of waypoints.  Possible, but if I ever need to do this for a specific group - is there a way to delete all their waypoints using a single command?

rem: if in multiplayer you must put groupname=group this in the init line of every member of the group, in case the leader AI gets disabled in the assign-roles screen.

Share this post


Link to post
Share on other sites

well, i guess a cycle waypoint could do exactly what you want war wolf, after a trigger got activated they stop cycling the last 2 waypoints and continue to do any waypoints after that cycle waypoint. other possibility is to dissmiss them and then catch all surviving units with a trigger and do something like

{"_x domove getpos homesweethome"} for each units thislist

another possibility would be to to really let them run away by allowing them to flee with the allowfleeing command, but this would be more or less chaotic.

also keep in mind that a waypoint can be forced to use other reasons then the presence of the unit entering the waypoint area to be completed. f.e. if you add a variable to a waypoint

waypointcondition: true and letthemrun

so all you have to do is to activate a variable letthemrun with a trigger at some point by stating: letthemrun=true

so if you enter the waypoint it will give that "waiting for others" entry aslong the trigger with the "letthemrun=true" is not active.

Share this post


Link to post
Share on other sites

Nah it doesn't work as intended.(v.1.08)

I've got a mission where I place some waypoints to a group runtime from a script,

then delete them all when something has happned, i.e. the last wp has been reached.

Now, all gets removed properly.

Again adding some wps, and again delete them when the last wp has been reached, and I know it has been reached as it has a blabla on onAct.

NOW, all but two gets deleted.

W....

Share this post


Link to post
Share on other sites

Scars09, one thing I've noticed in OFP is that waypoint conditions don't allow you to use multiple conditions (in otherwords no &&'s or ||'s). More specifically, using the condition "true && someVariable" doesn't work, nor is it necessary because the unit still moves to this waypoint before moving on to the next even if the condition is met while the unit is somewhere else (unlike a switch trigger which moves the unit on to the next waypoint regardless of whether or not the unit has reached that waypoint).

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×