I'm want the basic attack to spawn a different prefab based on the type of weapon a character is using. So similar to octopath traveler for example, you use a sword, it's a slash effect, but a club has a smack effect.

I've found that it's possible to switch out the sound based on the weapon, is the prefab also a possibility?

In my case changing it based on the class or combatant would work too.

Otherwise I could maybe create a bunch of different attack abilities and give them all a seperate battle event. But preferably not of course.;)
  • I may have found a solution, but haven't tested it yet.
    I'm going to set up status requirement templates for the different weapon types and then check those requirements in the attack event.

    Then in the attack event I'll spawn a different prefab based on the requirement and the rest plays like normal.

    Not at my work station right now, but will say if it worked. If there's a better way, would still kike to know :D
  • It works! So if anyone comes across this, what I did:

    In the ORK Framework Editor, go to Inventory -> Item types. Create a weapon type for each type that you want to spawn a different prefab with.

    Then in Base/Control -> Status Requirement Templates, create a requirement for each weapon type as well:
    Requirement type = Status
    Status Needed = Weapon Item Type
    Selection = Swords (one of the weapon types)
    Is equipped = True

    For unarmed, just put in a requirement for each weapon type and set Is Equipped to False for all of them.

    When that's setup, just put a 'Status Fork' in the attack event. Add Status requirements for all weapon types and fill in all the previously created stuff. Use a different spawn prefab node for each weapon type, attach it to the appropriate requirement. The prefabs are setup in the event settings. You can also play different sounds using this method.

    Of course end the Attack Event with a calculate step and whatever else you want to add.

    Now your character will spawn a different prefab at the enemy depending on their weapon type, similar to the older Final fantasies and Octopath Traveler.
  • Hm, theoretically you should also be able to use the equipment viewer system for this. Use your prefabs as the viewer prefabs for the weapons and have a (object) variable condition on the equipment viewer to manually toggle it on/off.
    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!
  • Could that be used for the particle effect that you spawn on the enemy?

    Cus the equipment viewer is for showing the weapon on the user, right?
  • No, only for the weapon prefab on the user, for spawning different prefabs you'd still have to use the method you already found yourself.

    An alternative would be to use base attack overrides in the weapons to use different attack abilities which are animated differently, but this would probably be more work than your current solution :)
    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.