Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Waypoint height, need to set hight coordinate for waypoints  (Read 2611 times)

0 Members and 1 Guest are viewing this topic.

Offline Dobermann

  • Members
  • *
  • Ready to disturb you anytime
I want to have guards patrolling on rooftops and such. Therefore I want to use SetWPPos with a hight coordinate to alter the height of the waypoint.
What I basically want to achieve is that I can use waypoints with a hight coordinate that I can alter to my liking. Right now the infantry troops will always try to get to the waypoint on ground level. This means they fall of the roof. Another use of this would be to have units patrol several floors and use stairways to get there. I don´t want to be limited to predefined building positions as they are to unflexible for my goals.
The Biki says that setWPPos only supports 2D coordinates, but this doesn´t seem to be true for Arma anymore.

What do I have to do to add height to already placed waypoints and how can I achieve that ? This would also be helpful for helos or planes that have regular waypoints and a flyinheight command as it would keep them from going up and down when getting near a waypoint.

What came to my mind aswell is the Arma specific movement pattern for AI infantry units. I guess their waypoint precision has been toned down by default in their config, so they sometimes have problems to go to a predefined spot. Is this right ?

Any input highly appreciated.

Offline Dobermann

  • Members
  • *
  • Ready to disturb you anytime
Re: Waypoint height, need to set hight coordinate for waypoints
« Reply #1 on: 12 Sep 2007, 15:28:48 »
Update:

I have now learned from Scars09 over at the official forums that the issue isn´t really bound to the waypoints, but is bound to the fact that the footsoldiers need to have a roadwayLOD to move upon within a house. This means that rooftops or balconies in houses that have no buildingPOS by default can´t be used with regular methods, including waypoints or doMove commands as they will first jump off the roof to get to a roadwayLOD and then try to get to the designated spot or object they are told to go to.
So regular pathfinding actually will not work at all on these kind of objects.

Can anyone of the scripting gods here think of an alternative approach, that does not need the embedded pathfinding ? Setvelocity will look strange  and even binding setvelocity with a walk animation will not work ok imo. I also thought about moving the units linear with a script but
I don´t know if this would interfere with their ability to react to threats.

Any input welcome.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Waypoint height, need to set hight coordinate for waypoints
« Reply #2 on: 12 Sep 2007, 16:10:02 »
the height of any rooftop is 0, just the same as normal ground, to test it just put a soldier over a rooftop and hint his pos.

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: Waypoint height, need to set hight coordinate for waypoints
« Reply #3 on: 12 Sep 2007, 16:43:00 »
actuly walk animation will work... u dont need setvelocity w/ it... but u wud need 2 have a script 4 every building nd 2 micro manage every step.... so its posible but gonna b hard 2 get right....

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Waypoint height, need to set hight coordinate for waypoints
« Reply #4 on: 12 Sep 2007, 23:37:30 »
@Dobermann
For future reference; do not double post.
If you have something to add to your post modify it instead of replying to yourself.
(if the last/only post in a thread is edited the thread gets the 'new' stamp on it..)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline paddy

  • Contributing Member
  • **
  • Llama whipping good
Re: Waypoint height, need to set hight coordinate for waypoints
« Reply #5 on: 13 Sep 2007, 14:48:20 »
As LCD rightly said, this is gunna be hard, the roof may be set to display as a 'floor' (i.e. a surface you can walk on) but it's probably the lack of a buildingpath that confuses the AI.

I can suggest 2 things
1) The best option would be to limit your guards to static positions on the roofs.  This will make them harder to spot and prevent alot of very tedious scripting.
2) setpos a flat walkway piece on top of a building, this should give the AI a pathway to follow.

1) is obviously the easiest but 2) is just an idea, I can remember doing it before but I never got the AI to sucessfully follow a path, I had to use scripts using setvelocity to 'keep them on path'  :-[ It looked a little ugly, in the end I just used 1) in that mission.

Let us know how you get on.

Offline Cheetah

  • Former Staff
  • ****
Re: Waypoint height, need to set hight coordinate for waypoints
« Reply #6 on: 13 Sep 2007, 19:19:38 »
What roof are you using for this? I remember that I got a guard to walk on the blue hotel's roof.
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline Dobermann

  • Members
  • *
  • Ready to disturb you anytime
Re: Waypoint height, need to set hight coordinate for waypoints
« Reply #7 on: 14 Sep 2007, 02:42:31 »
Basically I wanted to use this for a variety of roofs and large balconies as it would just look more real and possible give the
player some surprises.
The hotel roof works as it has a roadway LOD along with some other buildings but the majority of buildings don´t have such
and are therefore not suitable for this. Along with that issue I found out that some of the balconies ar enot useable at all.
I setpossed some units onto small setpossed pallettes on small balconies for an ambush but an issue with building geometry hinders them from shooting and being shot at by AI.
Quite frustrating if you can´t make use of that things.

@paddy : I tried the walkway suggestion but it really looks very ugly and is not suitable. I also tried to place the unit on a palette and totally removed it´s ability to freely move or change stance and slowly moved the palette, but the friction is too low to make it work. Looked funny though.

It would be usefull if BIS implemented a "doMoveFixed" command that would send a unit right to a desired spot without calculating a path that needs roadwayLOD or a buildingpath. This command could be used only for predefined pathways on every height level and would force the unit to follow the plotted pathway in a direct line.
Still, that´s wishfull thinking I guess.  :confused: If there is more interest in this, we could compile a little snippet and put a request in the BTS.
I guess it would make things easier, especially for small pathways to move on or bigger objects like ships, entrenchments, bunkers, BRIDGES :D, or such...
I can think of a lot of possibilities with a command like that as it would simply force the unit from point A to point B no matter what the unit is standing on or at what height it is.

By the way...how do aircrafts and helos conduct their routes as they don´t seem to be bound to such ?
Can we apply the way helos do their paths to infantry units ?  :blink:
« Last Edit: 14 Sep 2007, 02:58:24 by Dobermann »

Offline paddy

  • Contributing Member
  • **
  • Llama whipping good
Re: Waypoint height, need to set hight coordinate for waypoints
« Reply #8 on: 14 Sep 2007, 15:17:31 »
I think helos do not need paths because obviously they just rist over obstacles instead of circumnavigating them.  Unless you're gunna create a man addon that can fly I dont think that gunna work. 
I think you should try again using setpos and setvelocity just to make sure its not possible.  You can add the walking anim there and disable unit movement, theres probably some way to do this, we just havnt worked it out yet!!