Home   Help Search Login Register  

Author Topic: Gamelogics dont fall down  (Read 1111 times)

0 Members and 2 Guests are viewing this topic.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Gamelogics dont fall down
« on: 01 Jul 2007, 17:51:07 »
You place a gamelogic over a building in the map and its altitude above ground is 0, now you destroy that building and gamelogic's altitude above ground becomes the height of the destroyed building before being destroyed. Just take that into consideration when doing weird things like me :D


Offline The-Architect

  • Former Staff
  • ****
  • Bite my shiny metal...
    • Bob's Un-official Flashpoint Page
Re: Gamelogics dont fall down
« Reply #1 on: 01 Jul 2007, 17:53:48 »
Hmm, queer indeed. I reckon you should add this phenomenon to the wiki. It's the kind of stuff that needs to be updated so we can all learn this stuff inside out. Good, if rather odd discovery.  :clap:
James Andrew Wilkinson 1977 - 2005 R.I.P.
"If it ain't the friggin' incoming it's the friggin' outgoing. Only difference is who gets the friggin' grease, and that ain't no friggin' difference at all."

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Gamelogics dont fall down
« Reply #2 on: 01 Jul 2007, 18:10:42 »
Ah, but........

Is the engine counting the 'ground' as the roof of the building, which will have a roadway LOD.
Maybe it is seeing the roadway as the ground, so when you destroy the building, it stays where it was originally put, at the height of the buildings roof.

What does setPosASL and getPosASL tell you when placed and after the building is destroyed?


Planck
I know a little about a lot, and a lot about a little.

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Gamelogics dont fall down
« Reply #3 on: 01 Jul 2007, 18:18:49 »
Effectively, gamelogics stay all the time where you placed them, they dont fall from roofs  :P
And yes, any roof is considered ground, so getPos of anything above any roof will return 0. And getPosASL seems to be failing there too as it seems to consider the distance between ground at unit's position and sea plus the distance between unit and ground (which is 0 at roofs). Alternatively you may use an empty detector (created trigger), place it at the position of the unit with Z = 0, and check distance between unit and trigger. May be that distance will be the correct ASL height of the unit.