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/1zjpdnZRaycast Target. Touch/Mouse mode.
https://ibb.co/HVx3GV5Singe Target, UI Mode.
https://ibb.co/pw7tsXH
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?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Using Hit Chance and Critical Change. Target Settings, Health Points >formula>Physical Damage. Copied from tutorial's "Attack" Ability
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.
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.
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).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!