edited July 2017 in ORK Support
Hello .
I'm trying to familiarize myself with ORK while creating an action rpg , some thing along the lines of "Diablo " .
As the title says , i want to stop the player's movement while casting an ability like fireball .

My player is using " Animations & Movement > Autuomatic move Animations " for movement and i added a control map with 2 keys to cast fireball (with F key) and ice arrow (G).

In battle event , i tried all the Block move options , but i still can move .
I tried the " Block player Control " Node , but then if a monster uses fireball too , my movement will be blocked !
The only thing i can think of is to add an status effect to myself to change speed .

So how should i do this the right way ?
Post edited by shadowof047 on
  • edited July 2017
    Block Player Control is the correct event node. You need a different event for the enemy fireball.
    Post edited by dlevel on
  • Are you sure this is the correct way ? that doesnt seem like a good idea to me , what if i want to rotate my character while casting , or cancel casting ?
  • If you mean casting in regards to using the cast time of abilities, as long as you didn't enable Move While Casting in the ability's Cast Time Settings movement is blocked for the combatant.
    If you're using a custom control, you currently need to check the combatant's StopMovement status manually, as this doesn't block the player controls directly, e.g. put this in front of your movement code:
    if(!combatant.Status.StopMovement)
    The combatant of the game object can be found like this:
    Combatant combatant = ComponentHelper.GetCombatant(this.transform.root.gameObject);

    If you want to block the player controls while the player is in action, set Block Player Control in the real time battle settings to Player Actions.
    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 July 2017
    Thanks both of you . I actually ended up using "block player Control" node .

    Now i faced another problem , My ability projectile doesnt collide with the enemy.

    My projectile and ability is setup just like the "Throwing a fireball " tutorial , Sphere collider's "Is trigger" is on. projectile prefab is in the default layer .

    My enemy is in the Enemy layer and has a Capsule collider (Is Trigger is off) with navemesh , and a basic "Move AI " to patrol around randomly .

    Activation tags , in both "Damage Dealer" component and the " Activate Damage Dealer" node is set to " fireball"

    I even checked the layer matrix , and it says layer "Default" collides with layer "Enemy" .

    I cant figure out why my fireball doesnt collide with the enemy . i'll appreciate your help .
    Post edited by shadowof047 on
  • edited July 2017
    these settings work for me:

    https://postimg.org/image/o6is291zn/

    it also collides on the enemy so it doesn't go through him.

    and this is my event:

    https://postimg.org/image/x450q1mnh/

    with the activations tags as you already have them.
    Post edited by dlevel on
  • Make sure there's a rigidbody involved somewhere (either on the damage dealer or damage zone game object - or both).
    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 July 2017
    Make sure there's a rigidbody involved somewhere (either on the damage dealer or damage zone game object - or both).
    I got rigidbody component in both projectile prefab and my enemy .
    these settings work for me:

    https://postimg.org/image/o6is291zn/

    it also collides on the enemy so it doesn't go through him.

    and this is my event:

    https://postimg.org/image/x450q1mnh/

    with the activations tags as you already have them.
    Thanks for pictures . if i put "Damage Dealer" to Collision Enter , and turn off " Is Trigger " , it does collide with my enemy , but it either push my enemy away or get destroyed without reducing any hp depending on the "Destroy Setting" of the "Damage Dealer " Component .

    I'm really at loss , i checked and tried different things many times . but it is still the same :(
    I'll try posting some pictures of my settings later .
    -------------------------------------------------------
    EDIT : I recorded a video of my settings , you can see them here and hopefully tell me what i'm doing wrong . ( clicking on the link shows an empty page for me , just copy and paste the link )

    https://youtu.be/kL8D6bQ9a94
    Post edited by shadowof047 on
  • I m not on my Dev PC, but try to change your collision type to Collision enter instead of Trigger enter, like in my first screenshot.
  • edited July 2017
    I m not on my Dev PC, but try to change your collision type to Collision enter instead of Trigger enter, like in my first screenshot.

    I did that before . Putting it to "Collision Enter" and disabling the "Is Trigger" of the collider , just pushed my enemy away of the projectile path without doing any damage . i nearly tested all the combination i could think of, none of them worked !
    Post edited by shadowof047 on
  • Naturally, the Collision start types only work with Is Trigger disabled, the Trigger start types only work with Is Trigger enabled. That's basic Unity physics :)

    If the projectile pushes the enemy, enable Is Kinematic on the projectiles rigidbody.
    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 July 2017
    Naturally, the Collision start types only work with Is Trigger disabled, the Trigger start types only work with Is Trigger enabled. That's basic Unity physics :)
    Did i say otherwise ?

    dlevel asked me to try that scenario with "collision enter" and i did and reported the result exactly as it happened .

    And if you see the video of my setting , you would see that " Is kinematic " is enabled and hopefully see something that i missed .

    And my problem still remains ...
    Post edited by shadowof047 on
  • edited July 2017
    Nah, didn't watch the video - did now ... I didn't see a Damage Zone attached to your enemy's prefab. Without it, there's no way for the damage dealer to deal damage when hitting the enemy.
    Post edited by gamingislove on
    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!
  • Nah, didn't watch the video - did now ... I didn't see a Damage Zone attached to your enemy's prefab. Without it, there's no way for the damage dealer to deal damage when hitting the enemy.
    Thanks gamigislove , that was exactly what i was missing , now i can damage the enemies at last :)
Sign In or Register to comment.