Jump to content
Sign in to follow this  
kocrachon

Hold Waypoint

Recommended Posts

Ok I tried doing a seach on this but I kept getting a bunch of topics that did not cover this.

Anyways, I have a helicopter that is sitting in holding pattern, and I was wondering what command I use to make it move out of hold, I have waypoint 1 as the hold waypoint, then a 2nd waypoint as a move waypoint, so what do I type it to make it move onto its next waypoint.

Share this post


Link to post
Share on other sites

actually here is what I am trying to do.

I want it so that when my guy stands in a spot, the helicopter will move from its "hold" position and fly over head, to where it is scripted to land and pick up my team. I know the landing to pick up my team part works because when I remove the hold waypoint it flys, lands, and picks me up, now I just need to make it to where it wont fly to the pick up location with out me first moving to a current spot.

EDIT: I actually got it to work kind of, but I keep getting this error. The helicopter does what is suppose to and all, but I would kind of like to get rid of this error.

newerrorsi5.jpg

Share this post


Link to post
Share on other sites

so with the setcurrentwaypoint, how does that work? do I synchronize it with the hold waypoint?

And how would I use a switch trigger?

Right now my hardest issue is Im not understanding the examples they give me

grp setCurrentWaypoint [grp, 1]

Like what is the grp stand for, what am I suppose to put there? just put group or what?

and then [grp, 1], what is grp and 1? is 1 the number of the waypoint?

Share this post


Link to post
Share on other sites

ah ok, so I get that one working, now perhaps you can help me with the addwaypoint command, thats where I am now having a hard time working.

wp = grp addWaypoint [ position player, 0]

I don't understand that at all. Right now I have a helicopter that has a move waypoint as its last waypoint and in its on activation i have it set to land, which it does, now I want to make it to when my team walks into the exfil zone, the blackhawk will take back off, and fly to my guys, and all I need to do that is to have it add a waypoint. However, I am having a hard time understanding it, anyone want to help me out.

Right now my blackhawk is named B1, so if anyone could help by writing a sample script with that, and perhaps helping me identifying how to set up where i want the waypoint to be.

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">NewWP = (group B1) addWaypoint [pos,0]

You'll need to use some position in place of pos (the position where you want your waypoint to be created), how you get that position is up to you (there are a ton of different ways).

Share this post


Link to post
Share on other sites

well the current way i am thinking is by having a trigger set, except having hte trigger do nothing, but giving it a name, would I be able to use that trigger as the position in terms of putting it as the reference point?

Also here is what I have as my trigger right now

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">NewWP = (group B1) addWaypoint [little,0]; [B1,3] setwaypointtype "move";

but I get an error that says "Error Type Any: Expected Group"

Share this post


Link to post
Share on other sites

You could but if you're going to do that you might as well use a marker (since it's "neater"). Place the makrer (make it type Empty, the first Empty in the list, if you don't want it to show up on the map during the mission), give it a name, then use 'getMarkerPos "markername"' for your pos.

Share this post


Link to post
Share on other sites

where do I do this getmarkerpos?

And here is my new code

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">NewWP = (group B1) addWaypoint [little,0]; [group B1,2] setwaypointtype "move"; grp setcurrentwaypoint [group B1, 2]

The blackhawk lands, and just sits there. do I have to use actual numbers for the add waypoint or what?

EDIT: FYI little is the name of the marker i set.

Share this post


Link to post
Share on other sites

the first element of the array is position.

And you'll use the "getMarkerPos" as Kyle mentioned

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">NewWP = (group B1) addWaypoint [getMarkerPos "little",0]

(note the " around little as it is a marker)

[edit]

Ah, yes...

Its radius for the create waypoint.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">group addWaypoint [center, radius]

Anyways, the indexes does work for setwaypointtype and etc.

[/edit]

then

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[(group B1),0] setwaypointtype "move"

Im currently not near my Arma editor, just using the examples from the wiki and adding some example text.

HOWEVER.

I feel it strange that you couldn't use teh WP object you created i.e.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">NewWP setwaypointtype "move"

I'll have a look at this later to verify.

[edit]

You can do either way.

If you create a waypoint using a script you can:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">NewWP setwaypointtype "move"

or if you already have an existing waypoing added from the editor, you can use

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[(group B1),<wp_index>] setwaypointtype "move"

to alter the type for that specific waypoint.

Share this post


Link to post
Share on other sites
Quote[/b] ]The second element is the "index" of your waypoints.

If you have 3 waypoints,

the first one is at index 0,

the second is at index 1

and etc.

That's incorrect. Index 0 refers to a hidden waypoint automatically created at the unit's starting position. The first user created waypoint is at index 1. This is just for your own knowledge because I already helped HavocDemon with this on private terms.

Share this post


Link to post
Share on other sites
That's incorrect. Index 0 refers to a hidden waypoint automatically created at the unit's starting position. The first user created waypoint is at index 1. This is just for your own knowledge because I already helped HavocDemon with this on private terms.

Ok, good.

Changed my post accordingly.

Why not share what you wrote him in this topic as it might help others?

You do as you wish of course.

Share this post


Link to post
Share on other sites

Because it is not recorded and even if it was, it's not in a very helpful/appropriate format (MSN conversation).

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  

×