edited January 2014 in ORK Scripting
Heya GiL,

I see the Ground and Air conditions in the control maps; is it possible to hook into these conditions if you're not using the ORK character controller?

How does detection work, is it based on whether the controller or interaction controller is touching a specific layer or not? Would it be possible to make it so you can specify a gameobject's collider or trigger on a combatant to determine whether they're in the air or on the ground, and add a 'Check Ground / Air' event node?

(For example, you would create a small child object with a collider on, or slightly below your combatant's feet called 'GroundCheck.' If it's colliding with something, it'd be triggered as 'ground'.)
Post edited by gamingislove on
Tactics RPG Grid Battle System for ORK
---------------------------------------
Personal Twitter: https://twitter.com/AMO_Crate
I make RFI! https://twitter.com/NootboxGames
  • Jup, now that you've got code access, you can hook in there.

    The control maps get the info from the CombatantComponent - a component that's automatically added to each spawned combatant.
    By default, it checks for the CharacterController's isGrounded field, but you can replace that with your own logic.
    The CombatantComponent script can be found in Behaviours/Combatants.

    Since this involves scripting, I'll move it to that section :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 2014
    Ah cool! :D Thanks.

    So I guess to use it in events, I would create a game variable like 'IsOnGround', switch it on and off in my scripts, and then do a check for that variable in Events?
    Post edited by Kirb on
    Tactics RPG Grid Battle System for ORK
    ---------------------------------------
    Personal Twitter: https://twitter.com/AMO_Crate
    I make RFI! https://twitter.com/NootboxGames
  • Jup, something like that. But keep in mind that the CombatantComponent is on each combatant in a scene, not only the player - so you might want to set an object game variable, not a global one :)

    The object variables on a game object are accessed through the ObjectVariablesComponent script (found in Behaviours/Scene). The function GetHandler() lets you access its variable handler.
    Combatants have a setting to automatically add the object variable stuff :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.