Jump to content
Sign in to follow this  
Balschoiw

Height aspect for waypoints

Recommended Posts

I´m trying to make use of balconies in arma and also flat rooftops.

Is there a way to use waypoints that are not on ground level.

I had hoped that Arma would have a height aspect box for waypoints but they are still bound to the ground level for regular units.

So in short, will placing a gamelogic with a height setpos getpos combination work to send soldiers on routes that are above groundlevel (rooftop) in Arma with a script ?

Or is there a way to alter the regular waypoints to have them with an added height coordinate ?

Share this post


Link to post
Share on other sites

well if you want a soldier on a balcony that is in a building. All you gotta do pretty much is put the soldier in or outside the building. You have to be exact though, put the waypoint move in the building then move to the blacony and he should move to the balcony. Worked for me, hopefully this helps at all

- I found when u put a waypoint in a building the AI will only stay on ground level unless you make specific waypoints up the stairs.

Share this post


Link to post
Share on other sites

You might wanna have a look into this command:

buildingPos

Waypoints are only 2-dimensional, you can however

use waypoints with buildingpositions like balconies.

Share this post


Link to post
Share on other sites

I know that already.

However there are balconies that are not accessible via buildingpos and even if they are there is no way you can use the buildingpos to have a guard walking up and down on the balcony.

To make it clear:

1. I want to have guards patrolling a rooftop

2. I want guard patrolling balconies.

Edit: Just checked the Biki on the new setposASL command that came with Arma. Looks like this is the one to go for, but the syntax seems to be broken as I do get a missing "]" every time I use it.

Here is the Page:

setposASL

huh.gif

Share this post


Link to post
Share on other sites

The command setposASL works as intended, can you post exactly what your commandline using the command looks like?

Well, patroling rooftops and balconies in the way that you want it is nearly impossible.

Unfortunately Setvelocity does not work on soldiers, which would be a way around the move commands. You could try to play walk animations and setpos-looping the soldiers the way you want it, but that might look odd.

When i experimented with snipers on rooftops they most of the time just commit suicide and jump down from the roof when issued move commands.

Share this post


Link to post
Share on other sites

m1 setPosASL [ getPosASL m1 select 0, getPosASL m1 select 1 + 15, getPosASL select 2]

Just like in the example gives me an error.

What´s the difference to the regular (OFP) setpos , getpos anyway ?

Quote[/b] ]When i experimented with snipers on rooftops they most of the time just commit suicide and jump down from the roof when issued move commands.

That´s because they try to get on the 0 Z coordinate that is coming along with regular waypoints.

I still do have hope that I might get it work. i´m just editing the mission.sqm to get results.

As you can see the WP´s do have a Z coord they take into account but it can´t be altered from WP setup.

From mission.sqm:

position[]={12532.415039,178.740036,13406.507813};

Oh and btw, slap on BIS thinktank backhead. This is an issue that is as old as OFP. A Z coordinate for waypoints should be standard with ArAs...

BTW does anyone have a script ready that displays absolute coords in combination with camera.sqs ?

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">

m1 setPosASL [ getPosASL m1 select 0, (getPosASL m1 select 1) + 15, getPosASL select 2]

You have to use brackets to separate the select from the addition.

The difference is that you can use an absolute height above sea level !, that is not dependent on the terrain curvature.

Share this post


Link to post
Share on other sites

So the code on the example of the Biki is wrong ?

You could add the other info aswell if you want.

Thx for input.

Share this post


Link to post
Share on other sites

The Biki is written by users and prone to mistakes.

So this is one of them, but the principal error in your line

is that you have forgot to state the object in the getposASL command inside the 3rd element of the array.

So there is actually two errors in that array from the Biki.

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

m1 setPosASL [ getPosASL m1 select 0, (getPosASL m1 select 1) + 15, getPosASL m1 select 2]

Note also:

Quote[/b] ]

As you can see the WP´s do have a Z coord they take into account but it can´t be altered from WP setup.

From mission.sqm:

position[]={12532.415039,178.740036,13406.507813};

The z coordinate in the mission.sqm is NOT the absolute height!

In Direct3D applications and their world matrix the y-coordinate expresses the height, for unclear reasons BIS have swapped the y and z coordinates in the accessable OFP/ArmA transformation functions resulting in a discrepancy between coordinates in the mission.sqm and the coordinates returned by commands like getposASL.

Share this post


Link to post
Share on other sites

Thx both of you ! thumbs-up.gif

I´m trying SetWPPos now.

I also fixed the Biki entry.

Thx again. I will report back in when I have tested the SetWPPos command.

Share this post


Link to post
Share on other sites

For my intentions not really, but that was more a problem with the used objects.

It should work for your flight problems though.

Share this post


Link to post
Share on other sites

The script written as shown in the wiki gives me errors???

Example of one working solution of defining the height of a waypoint please, anyone?

Share this post


Link to post
Share on other sites

It's easy.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[group1,1] setWPPos [(getWPPos [group1,1] select 0),(getWPPos [group1,1] select 1),100]

Group1 is the name of your group and 1 is the waypoint number.

Share this post


Link to post
Share on other sites

The first part (group, waypoint#) is pretty obvious, otherwise the game would not know which WP to move.

I tried a similar thing with numerical x, y, z co-ordinates and the game only gave me errors. Wiki also mentions about fourth digit, something about random radius (on some waypoint entries the third number is refered as radius rather than height). So there are numerous different possibilities: co-ordinates 2D, co-ordinates 3D, third value is radius rather than heigth or there are actually four values.

This is pretty confusing... should be some kind of standard so you don't have to guess.

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  

×