edited March 2022 in ORK Support
Hello,
I am trying to setup a "Ice Storm" ability in a real time point-click game but I am currently encountering few problems I've been trying to debug (unsuccessfully) for a while.
The first one is getting the ability to spawn a prefab in a clicked location (mouse mid button click).
The ability is using this Battle Animation schematic.
image
If I remove the Raycast Node the ability is executed but the Prefab gets spawned in the world origin, if I keep the RayCast node the ability does not go though at all (it does not even print the Raycast "Failed" output).
This is how I set Battles>Target Settings
image
Post edited by ChimpLogik on
  • If your ability is using raycast targeting (i.e. it has a None target range and uses the raycast settings), the targeted position is available as the Starting Object of the ability's schematics.
    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 March 2022
    That worked great, thank you!

    Now that I can actually see where the ability is spawning the vfx in the proper positon, I noticed that it's not actually doing any AOE damage to the combatants in the area.

    I activated the Damage Dealer on the schematic this way.

    image

    And this is what I have on the vfx prefab that gets spawned

    image

    I also added a Damage Zone to the combatants to receive the damage and the ability has this status change set in the Target Setting section:

    image
    Did I miss anything?
    Post edited by ChimpLogik on
  • I assume the damage zone is on the prefab you spawn, so you should use that prefab in the Activate Damage Dealer node instead of the starting object. Might also need a short Wait node (0 second) to give Unity time to spawn the prefab first, not 100% sure there, though.
    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!
  • I tried it but it didn't work. I read in the Damage Dealer note that

    "an environmental damage dealer always requires a combatant - you can either define a combatant here or let the damage dealer find a Combatant Component attached to the game object (eg when on an already spawned combatant).".

    The ability is called by the player, but I checked and the spanwned prefab that has the Damage Dealer Component and it does not have a Combatant Component attached to it.

    Do I have to set a separate combatant for any ability with a damage dealer?
  • Environmental damage dealers are something different, you'd use the Always On option for that. They're e.g. used for contact damage on a combatant or traps/damage areas in your scenes. They're not used for regular abilities used in battle.

    Do you have other damage dealers that are working in your setup?
    Generally, when using the Trigger Enter start type in your damage dealer, they'll deal damage if a damage zone enters their trigger - i.e. Unity physics event has to be working correctly. Make sure your setup here is correct.
    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!
  • The only damage dealer working in my setup so far is an environmental one for a damage area with the Always On option.
    This is the first one I'm setting for an ability so I'm a little clueless :(

    I was going through the setups and I noticed that in the ability schematic says that the Calculate Action Node shouldn't be used with Damage Dealers.
    Not sure what to use instead though. I tried using the Use Ability Calculation Node but that also didn't work.

    image
  • Well - you can deal damage in 2 ways, either via the Calculate Action node, which calculates the outcome of the action with the user and targets of the action, or with damage dealers/zones.

    You can combine both, but usually you'd want to only deal damage when the damage dealer hits something.

    Did you check out the 3D Action RPG tutorial series? It handles damage via damage dealers/zones.
    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!
  • I did, I tried to adapt the enemy spit ability from the 3D Action RPG tutorial series to the player, but not nearly as successful :P

    I did some tests and I noticed that if I changed the Object in the Calculate Action Node I was able to damage the Player (regardless of the ability prefab position though).
    I tried most other options from the dropdown menu but never got to damage the Combatants inside the collider of the spawned prefab with the Damage Dealer.
    How does the ability know from the schematic what are the targets to calculate the damage against?

    image
  • As said, the Calculate Action node is usually not used with damage dealers, since you want to do damage via physical contact to a target. You'd only use them with damage dealers if you also use a schematic to animate the damage dealer's damage (i.e. the ability's damage dealer setup has schematics added).

    Based on your screenshot, the setup should be correct (if it activates on the spawned prefab as I said earlier). It's most likely due to Unity physics not firing an event - make sure that setup is correct, e.g. damage dealer/zones have colliders, rigidbodies, etc.
    Also, it depends on how your stuff is moved. E.g. moving via transform doesn't cause physics events, so you'd need to move via rigidbody, character controller or navmesh agents.
    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!
  • Unfortunately the ability does not involve any physics-related movement.
    I just click in a position, a prefab is spawned in that position, whoever is inside the prefab's collider gets damaged.
    The spawned prefab has a rigid body component, a (trigger) collider and a Damage Dealer.
    I also tried using TriggerStay on the Damage Dealer hoping it would fire an event but no results there.

    The alternative method you suggested via the Calculate Action node though requires having a list of targets for the Action but for this type of ability I'm not sure how to obtain the targets other than through a collider.
  • Spawning it there should cause trigger enter, as long as the combatants with damage zones also have colliders. If trigger enter is too soon (e.g. activated after that), at least trigger stay should do damage.
    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 2022
    I removed the Target Selection Setting Not On Self and with the player entered and exited the ability collider during the action but no damage was dealt nor any ability status effects applied on the player.

    I installed the 3DRPGPlayground project to compare the settings. I went through all the options I could think of and the only relevant difference I found is that my ability has Target Range = None since it needs Raycasting, while the 3DRPGPlayground AOE abilities (Spit and Flamethrower) have a Target Range = Single.
    Not sure if that's relevant.

    I also tried adding a Tag with a Schematic in the Battle Animation of the ability (similar to the 3DRPGPlayground Flamethrower ability) with these settings
    image
    image
    with some console messages for testing but that Schematic doesn't seem to fire at all.
    Post edited by ChimpLogik on
  • Is there a way to check if the Damage Dealer action/ability has been set via schematics?
    I checked Damage Dealer component at runtime and doesn't seem to show any action/ability in the Activation Settings.
  • edited April 2022
    Ok, it took me a good amount of attempts but I eventually got it to work :)
    Post edited by ChimpLogik on
Sign In or Register to comment.