• Content count

  • Joined

  • Last visited

  • Medals

Community Reputation

68 Excellent


About theend3r

  • Rank
    Staff Sergeant

Recent Profile Visitors

293 profile views
  1. Nope, doesn't work. Returns 0 at the roof of the building where I do my testing (Tanoa, [13268,12239,0]) whereas (((getPosATL player) vectorDiff (getPos player)) select 2) returns the correct height of the building (9.7 - also visible when placing units in the editor in their z value). Still, I'm sure this approach of using the intersect commands is correct. I'll have to give up today but I'm sure I can work it out if I try. I did.
  2. Try the above with player. It's 0 while on ground, 0 when climbing a ladder or falling but positive when standing on the top of a structure. The problem is that the commands available can only work with a reference object, not coordinates. I can just move an invisible helipad around like @bad benson said but I wanted to avoid that.
  3. Yes, sorry, I though you we spawning it through a script as the editor does that automatically.
  4. No. I'll try to make it as simple as possible. I want to get this hint str (((getPosATL object) vectorDiff (getPos object)) select 2) without referencing any non-default object, i.e. purely from the map/coordinates (coordinates equal to getPos object). I guess it's not possible but it's OK, this was just out of curiosity. Thanks for the replies everyone.
  5. Through bis_fnc_findSafePos, like I said. It works well for my needs and honestly there's no need to modify it but it excludes one uphill part of the location. The function itself checks for object proximity so there's probably no need to do this anyway but I simply wanted to know if it's possible.
  6. Yes, what I'm trying to do is definitely achievable by using a virtual/invisible "pointer" that runs getPosATL pointer but I was trying to do it purely with numbers/arrays as I have to run this potentially about 40 times at once (not every frame but still) when spawning enemies and it could result in a visible slowdown if I had to spawn and move around some invisible pointer (probably not but...). For now I can do it with ((AGLToASL _pos) select 2) > 6 since I know the terrain and it's basically flat but it limits me. I will probably go this way anyway. Thanks for the input.
  7. ATL, if I understand it correctly, is the only way to tell if I stand on top of a map (not editor) placed structure. Like in my example, ATL returns a height of 5.23744. The problem is that we have all these functions for ASL -> ATL...etc. but not one for AGLS -> ATL or AGSL -> anything because "As there is currently no way to obtain H of the surface, it becomes impossible to convert given PositionAGLS into other formats" - biki. And of course getPos / setPos (and thus also bis_fnc_findSafePos, btw) take AGLS. Is there any simple way to check if a position (not an object) is on top of a building / container / ... ? I guess terrainIntersect or something similar could do it but it seems a bit ridiculous and demanding to do it potentially many times. Edit: To make things even more ridiculous, player setPos getPos player, when used from the top of a container pile (in Blue Pearl industrial port, Tanoa) places you down inside of it.
  8. By "doesn't help at all" I meant that I don't need a spawning script, I have mine. I need what I wrote I need: ATL - AGL(S) for a coordinate array. AGLStoATL.
  9. That doesn't help at all but thanks for replying.
  10. I'm randomly spawning AI using bis_fnc_findSafePos but I don't want them to be spawned on buildings/containers etc. How do I get ATL - AGL(S)? Example: I put myself on a container in a harbor that is a part of the map and run hint str [getPosATL player, getPos player] which returns [[13330.7,12197.6,5.23744],[13330.7,12197.6,0.00143862]]. This is not a problem with objects but when working purely with coordinates, I have no idea how to get the 5.23 from the 0.
  11. Thanks, incredible that I've been ignorant of this until now. Also thanks. The global was there in the second example just for testing.
  12. Once again, just spawn it with the "FLY" state, it's easier than setting velocity.
  13. The following does not work and I can't figure out why: if (_deathSound != "NONE") then { _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; _deathSoundPath = _soundPath + "Sound\" + _deathSound + ".ogg"; } else { _deathSoundPath = "NONE"; }; systemChat "Path:"; systemChat _deathSoundPath; SystemChat prints just the string, the _deathSoundPath is not defined. The inside of the condition works just fine when alone and I guess I could just leave it since playSound3D doesn't return an error when given a non-existing file but it still bugs me. The following works: if (_deathSound != "NONE") then { _soundPath = [(str missionConfigFile), 0, -15] call BIS_fnc_trimString; deathSoundPath = _soundPath + "Sound\" + _deathSound + ".ogg"; } else { deathSoundPath = "NONE"; }; _deathSoundPath = deathSoundPath; systemChat "Path:"; systemChat _deathSoundPath; which would imply scope problems but conditions shouldn't create their own scopes, no?