logo hyperPad Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Login

    How do you code strikes?

    Scheduled Pinned Locked Moved
    Help and Support
    2
    3
    163
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • SplitMindGamingS
      SplitMindGaming
      last edited by

      This is not my image by the way. Just a reference. How would you code this in hyperpad. Basically a strike coming from an animation. Do you redraw the collisions so it expands? I understand how this would work with rigging but I cant wrap my brain on how this would work with hyperpad.

      Title_Image.png

      1 Reply Last reply Reply Quote 0
      • RobinsonXR
        RobinsonX
        last edited by

        Don't worry about redrawing collisions. Focus on the animation of the character for now.

        Started Touching -> Play Animation
        You can also make it play a sound and add other effects for the animation.

        You can have another object act as a hit box for the sword. It'll be invisible, but at least it'll make things a lot easier.
        You want to move this object to the player when the player strikes. It would teleport instantly, so use 0s duration.

        So now we have:
        Started Touching -> Move to Object + Play Animation
        You can change the anchors in the Move to Object behavior so that the hitbox can move to where the sword is swinging in front of the player!

        You can code the hit box object to damage enemies on collision.
        And of course, you want to take the hit box away so that the enemies don't get damaged when the animation is over. You can move the object to a point, say (-99999,-99999) for example, where it is very far from the enemies.

        And now we have:
        Started Touching -> Move to Object + Play Animation -> Move to Point

        SplitMindGamingS 1 Reply Last reply Reply Quote 1
        • SplitMindGamingS
          SplitMindGaming @RobinsonX
          last edited by

          @RobinsonX Nice. I was thinking it had to do with some type of weld attach. Never thought to make an invisible hit box. Thanks

          1 Reply Last reply Reply Quote 1
          • First post
            Last post