I want to create ability like roll or jump to a mouse position with top down style. What I have done so far, it to mimic the firewall ability to target aoe but instead spawn prefab I use change position. For a roll ability I can roll but the character is go back to last move click position by walking what is wrong with it? did I miss something?

I am using mouse click player control, character controller, and mecanim animation.
  • edited May 2018
    Your player controls are probably not blocked while using the action - i.e. clicking there is also moving the player.
    You could either block the player controls during Player Actions in your battle system's settings, or manually block the player controls in the battle event used by your ability through a Block Player Control node (but don't forget to unblock the controls at the end of the event).
    Post edited by gamingislove on
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Thanks I managed to do this properly finally.
  • Is there anyway to check layer in event system? I saw it, but I don't think that's what I need, it just checks as bool not string of the layer.

    I want to check my target (raycast from the screen) layer = "enemy" or "ground" or something else like wall etc.

    or any other solution for this kind of problem?
  • The raycast's Layer Mask setting determines which layers will be hit by the raycast.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • yes I did that, my ability is raycasting the ground layer and enemy layer, so the target can be 2 types, and I want to filter / choose in event system if I get the ground layer, the do A but if enemy layer then do B, in one event system and one ability, can this be done?
  • You can either do 2 separate raycasts (one for each layer), or use a Check Object Layer node to check which layer the object that was hit is on.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I still couldn't do it, I want to check my target raycast (by click from screen) wether it's a groud layer or enemy layer. I tried with value = index of layer or store it to variable to compare with string both of them still fail. How can I do this with battle event? Can you give me a simple example?
  • edited August 20
    Use a Raycast Object node to store the game object that was hit as a found object. The node uses the layers you want to check.
    Next, use a Check Object Layer node to check for the first layer on the found object you stored the game object into (the layer value being the index of the layer, e.g. layer 5 would be 5). The failed slot connects to another Check Object Layer node to check for the next layer, etc.
    Post edited by gamingislove on
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.