Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
hyperPad

hyperPad Forum

  1. Home
  2. Help and Support
  3. Hit by bullet management tips & tricks

Hit by bullet management tips & tricks

Scheduled Pinned Locked Moved Help and Support
3 Posts 2 Posters 42 Views 1 Watching
  • 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.
  • MrAeon1111M Offline
    MrAeon1111M Offline
    MrAeon1111
    wrote last edited by
    #1

    Hello,
    Can you please give me some advice? How to manage that?
    I am working on the bullet hell.
    I have enemies shooting with shoot.
    When I choose hit by bullet I have to choose the source of shoot every single time?
    So if I have 100 enemies shooting three different type of bullet each. How do I manage that?

    The bullets are not objects unfortunately.

    1 Reply Last reply
    0
    • RobinsonXR Offline
      RobinsonXR Offline
      RobinsonX
      wrote last edited by
      #2

      In the Hit by Bullet behavior, you can leave the behavior blank to handle all bullets. The behavior outputs shoot_behavior, which is the name of the behavior that the bullet comes from. You can check the name of the behavior to see which behavior the bullet came from, and from there you could handle logic differently depending on what type of bullet hit you. You are also given shooter which is the object the bullet originated from. This also works for spawned objects - it will give the same name when the same shoot behavior is used across different spawned objects (in other words, no additional work is needed for spawned enemies).

      If you named your shoot behaviors appropriately, it will be easy to distinguish between different types of bullets. Even if you have multiple shoot behaviors with similar names, you can use a Boolean behavior to check if the name contains a specific text. So something like "Fire" and "Fire1" will still work. The Boolean behavior outputs 0 (false) or 1 (true), and you can use an If behavior to only trigger specific logic when the output is 1.

      IMG_9255.png
      IMG_9256.png

      1 Reply Last reply
      0
      • RobinsonXR Offline
        RobinsonXR Offline
        RobinsonX
        wrote last edited by
        #3

        Here's an example on how to use the Boolean behaviors.
        The Text Operation behavior can also work this way if you wanted to check the prefix of the behavior name instead or something like that.

        IMG_9257.png
        IMG_9258.png

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Search