Hey,
I want to use an ability (attack) on the field, and have problems in target selection.
When I chose to have a Single or group target selection, it works but is UI based and not suitable while in the field and playing dynamically. (attacks selected enemy, shows flying text, give him damage)
I discovered and implemented raycast more, it selects target, and when fired, shows white sparks flowing on target but the attack dont actually work. No flying text, no damage. just a particle on target.

I want it
1. To attack the nearest enemies in front of theof player (under a defined range).
2. Even the ray-cast system needs me to tap or select the target. Can it be auto?
3. When in ray-cast. After I select a target, why is it not affecting him?



Setting for raycast mode selection.
https://ibb.co/1zjpdnZ


Raycast Target. Touch/Mouse mode.
https://ibb.co/HVx3GV5



Singe Target, UI Mode.
https://ibb.co/pw7tsXH

  • If you set your raycast targeting's Mouse/Touch Control input type to None, the raycast is fired without needint to click or use any input.
    You need to enable Use Mouse Position in the AI/Auto Target Settings if you want it to fire at the current cursor positon, otherwise it'll fire from the screen center.

    How is our ability doing damage - via damage dealers or using the Calculate Action node?
    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 April 2023
    "How is our ability doing damage?"

    Using Hit Chance and Critical Change. Target Settings, Health Points >formula>Physical Damage. Copied from tutorial's "Attack" Ability

    Five

    https://orkframework.com/guide/tutorials/status-system-setup/07-abilities-part-1-attacks/



    Another Question.
    I am unable to get the selected targets (using ray-cast) in schematics.
    Post edited by MehranGul on
  • image

    It don't select multiple targets. Can it be RaycastAll ? Damage is not working, and only first target is selected.

    And if there is a way to have them all (ray hits) selected. How will i get them in BattleAnimationSchematic?

    I want a list of targets to be sent to Unity Message (custom script) from this skill.
    OR multiple calls (message) to a function with every target selected.
  • MehranGul said: Using Hit Chance and Critical Change. Target Settings, Health Points >formula>Physical Damage. Copied from tutorial's "Attack" Ability
    The question was about how the damage is calcualted - via damage dealers or Calculate Action node?

    Raycast targeting doesn't have targets (that's why it's available for None targets. The Starting Object of the schematics animating the action is a newly created, empty game object at the position that was hit. If you want to use targets there, you need to either get them from that position in your schematics, or e.g. use damage dealers to do damage (e.g. spawned from prefabs).
    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!
  • HI, from above method, I am getting "_RaycastTargetPosition" as the selected target in Schematic. How can i find the actual raycast target? the enemy combatant itself.
  • As said, raycast target doesn't use a combatant as target.
    From the raycast target position, you can get combatants around the position e.g. using the Select Combatant Objects node, which has settings for range checks, being an enemy, etc.
    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.