Jump to content
Sign in to follow this  
KeyCat

Get waypoint type

Recommended Posts

Hi,

Wonder if someone found a way to read the waypoint type from a script?

We have a setWaypointType but I need the reverse of it. Any clever way to accomplish it?

Appreciate any input...

/KC

Share this post


Link to post
Share on other sites

just a shot in the dark but what kind of "object" is a waypoint anyway? is it possible that it's just an array with the various properties as elements? i'll have to check up on that idea smile_o.gif

nah - forget i said anything. not useful at all :/ unless "WEST 1-1-A" etc. helps anyone wink_o.gif

what are those two numbers for anyhow?

Share this post


Link to post
Share on other sites

West-1-1-A is the squad indicator.

I happen to know for a fact that waypoints are assigned to the group, they're not individual objects (well, they are in the programming sense, but not the it's a tree type of sense), but a property of said group.

The way I figured this out is this:

You may or may not be familiar with my populate island script. What it does is only draw units that are near the player, or have been overiden by setting a variable. I did some work on a militarised version of this, which I have yet to complete.

One of the related side projects I did, attached to the milatarised version, is dynamically reducing/restoring groups that aren't in play but where placed in the mission using the editor (as opposed to dynamically generated in mission).

Well, when you remove everyone from a group in arma, the group is actually never removed, it's just empty. If you readd someone to an empty group, they follow the group's old waypoint information.

Share this post


Link to post
Share on other sites

Thanks for the input! Yesterday I was playing around with currentCommand and expectedDestination in hope to find a way to accomplish it but found no solution to my problem.

So if anyone comes up with something that works let us all know...

/KC

Share this post


Link to post
Share on other sites

You could add a variable when setting a type in a script. Like:

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

bla setWaypointType wp1type

That way you can check the buddy variable's contents.

Share this post


Link to post
Share on other sites
You could add a variable when setting a type in a script.

That wont work for me. I want to read user assigned waypoints and get their different types (after they are placed in the editor) from my script. But thanks anyway.

A "getWaypointType" command would be nice wink_o.gif

/KC

Share this post


Link to post
Share on other sites
Quote[/b] ]A "getWaypointType" command would be nice

Yeah, this would be really useful and help to integrate user made scripts with the mission editor.

I was a bit surprised when I read they weren't included. I just took it for granted there would be the equivalent commands for getting info.

Anyway, I've added it to the Wish list on the Wiki.

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  

×