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. Need help with shooting and monsters killing you.

Need help with shooting and monsters killing you.

Scheduled Pinned Locked Moved Help and Support
41 Posts 7 Posters 19.6k Views 3 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.
  • SytheMediaS Offline
    SytheMediaS Offline
    SytheMedia
    wrote on last edited by
    #1

    I need help with something in my game, does anyone know how to make monsters kill you and move and when you shoot they die?

    SytheMediaS 1 Reply Last reply
    0
    • SytheMediaS SytheMedia

      I need help with something in my game, does anyone know how to make monsters kill you and move and when you shoot they die?

      SytheMediaS Offline
      SytheMediaS Offline
      SytheMedia
      wrote on last edited by
      #2

      @GAE-Network said in Need help with shooting and monsters killing you.:

      I need help with something in my game, does anyone know how to make monsters kill you and move and when you shoot they die?

      1 Reply Last reply
      0
      • Aidan_FireA Offline
        Aidan_FireA Offline
        Aidan_Fire
        wrote on last edited by Aidan_Fire
        #3

        @GAE-Network What are you using for shooting? If you’re using the shoot with button behaviour, then the behaviours to add inside your monster should be hit by bullet (under object tab) and destroy object (connected underneath hit by bullet). 0_1510265427018_EBB6F8E3-538F-40F2-A5B5-7C689B65D81D.png
        For making them move, this depends on how exactly you want them to move.

        1 Reply Last reply
        0
        • SytheMediaS Offline
          SytheMediaS Offline
          SytheMedia
          wrote on last edited by
          #4

          I’m trying to do like hitpoints.

          Aidan_FireA 1 Reply Last reply
          0
          • SytheMediaS SytheMedia

            I’m trying to do like hitpoints.

            Aidan_FireA Offline
            Aidan_FireA Offline
            Aidan_Fire
            wrote on last edited by
            #5

            @GAE-Network
            0_1510346505913_3C68CBB4-51D9-4DE9-9A44-CE2EFF15F293.png
            The box container is the monster’s health (in my Example, it has 10 health). When the monster gets hit by a bullet, you subtract a number (in my example, hitting a bullet takes 1 health), and then set the box container to the new subtracted health (this is don’t by using the set input field with the output of subtract values in it. You can get the set input field behaviour by pressing the box container, then at the far left of the text field press the button there. Now, if the monsters health reaches zero, it will die (be destroyed). Hope this makes sense.

            KamdroidK 1 Reply Last reply
            0
            • Aidan_FireA Aidan_Fire

              @GAE-Network
              0_1510346505913_3C68CBB4-51D9-4DE9-9A44-CE2EFF15F293.png
              The box container is the monster’s health (in my Example, it has 10 health). When the monster gets hit by a bullet, you subtract a number (in my example, hitting a bullet takes 1 health), and then set the box container to the new subtracted health (this is don’t by using the set input field with the output of subtract values in it. You can get the set input field behaviour by pressing the box container, then at the far left of the text field press the button there. Now, if the monsters health reaches zero, it will die (be destroyed). Hope this makes sense.

              KamdroidK Offline
              KamdroidK Offline
              Kamdroid
              wrote on last edited by
              #6

              @Aidan-Oxley What’s the best way to attach a health bar object to each enemy?

              D Aidan_FireA 2 Replies Last reply
              0
              • KamdroidK Kamdroid

                @Aidan-Oxley What’s the best way to attach a health bar object to each enemy?

                D Offline
                D Offline
                Deeeds
                wrote on last edited by
                #7

                @Kamdroid I'm not helping here: physics is the best way to do it, but hyperPad hasn't turned on the physics capabilities of health bars.

                My best alternative (doesn't work for fast moving or dynamic characters) is to use Move To focused on the character with an appropriate offset. Nowhere near good, nothing like the organic magic of physics. DOH!

                1 Reply Last reply
                0
                • KamdroidK Kamdroid

                  @Aidan-Oxley What’s the best way to attach a health bar object to each enemy?

                  Aidan_FireA Offline
                  Aidan_FireA Offline
                  Aidan_Fire
                  wrote on last edited by
                  #8

                  @Kamdroid With difficulty. You can just run a timer and move to object, because hyperPad doesn’t really give you a way to find the right object (since they will be a bunch of spawned objects). The way my 3D points work (the faces of the shape have to conform to their spawned points) is the actually Collide with the point, which is in a tag, and the collision with that tag is being detected. Then any behaviour underneath that uses that tag will only use the object it collided with. Just as I was writing this I thought of another way using arrays, storing the positions of every object constantly in an array could work, but I don’t know what would happen if 10 or 20 objects were modifying an array 60 times a second.

                  iTap DevelopmentI 1 Reply Last reply
                  0
                  • Aidan_FireA Aidan_Fire

                    @Kamdroid With difficulty. You can just run a timer and move to object, because hyperPad doesn’t really give you a way to find the right object (since they will be a bunch of spawned objects). The way my 3D points work (the faces of the shape have to conform to their spawned points) is the actually Collide with the point, which is in a tag, and the collision with that tag is being detected. Then any behaviour underneath that uses that tag will only use the object it collided with. Just as I was writing this I thought of another way using arrays, storing the positions of every object constantly in an array could work, but I don’t know what would happen if 10 or 20 objects were modifying an array 60 times a second.

                    iTap DevelopmentI Offline
                    iTap DevelopmentI Offline
                    iTap Development
                    wrote on last edited by
                    #9

                    @Aidan-Oxley you can easily communicate with spawned objects using broadcast and receive message. Basically broadcast key is the object you want, and each object when created you set its id and use it for the receive key.

                    D Aidan_FireA 2 Replies Last reply
                    0
                    • iTap DevelopmentI iTap Development

                      @Aidan-Oxley you can easily communicate with spawned objects using broadcast and receive message. Basically broadcast key is the object you want, and each object when created you set its id and use it for the receive key.

                      D Offline
                      D Offline
                      Deeeds
                      wrote on last edited by
                      #10

                      @iTap-Development How do you create broadcasts with the unique keys of the spawned objects? You don't know what their IDs will be at launch.

                      iTap DevelopmentI 1 Reply Last reply
                      0
                      • iTap DevelopmentI iTap Development

                        @Aidan-Oxley you can easily communicate with spawned objects using broadcast and receive message. Basically broadcast key is the object you want, and each object when created you set its id and use it for the receive key.

                        Aidan_FireA Offline
                        Aidan_FireA Offline
                        Aidan_Fire
                        wrote on last edited by
                        #11

                        @iTap-Development Actually, I think you might be right. I haven’t played with broadcast messages since they added the dynamic names. This is good.

                        1 Reply Last reply
                        0
                        • D Deeeds

                          @iTap-Development How do you create broadcasts with the unique keys of the spawned objects? You don't know what their IDs will be at launch.

                          iTap DevelopmentI Offline
                          iTap DevelopmentI Offline
                          iTap Development
                          wrote on last edited by
                          #12

                          @Deeeds the broadcast key needs to be a variable or you could use set input field. I prefer the former.
                          The receive keys in the spawned objects will be set when they are created. So you could have it be simply objects 0-100 or name them for certain uses etc. then just change the broadcast variable for the object you want.
                          And obviously in the spawned object you would have the behaviors you want run connected under the receive message behavior.

                          I know it works because that’s what I did in the interactive tutorial for the line connecting the behaviors.

                          And I would recommend spawning all the objects you want at the beginning and bringing them on screen as you need them, since spawning is a slower behavior. For example making custom particles etc.

                          D 1 Reply Last reply
                          0
                          • iTap DevelopmentI iTap Development

                            @Deeeds the broadcast key needs to be a variable or you could use set input field. I prefer the former.
                            The receive keys in the spawned objects will be set when they are created. So you could have it be simply objects 0-100 or name them for certain uses etc. then just change the broadcast variable for the object you want.
                            And obviously in the spawned object you would have the behaviors you want run connected under the receive message behavior.

                            I know it works because that’s what I did in the interactive tutorial for the line connecting the behaviors.

                            And I would recommend spawning all the objects you want at the beginning and bringing them on screen as you need them, since spawning is a slower behavior. For example making custom particles etc.

                            D Offline
                            D Offline
                            Deeeds
                            wrote on last edited by
                            #13

                            @iTap-Development Sorry, what do you mean about custom particles? Precaching them by firing the particle emitter before needed?

                            iTap DevelopmentI 1 Reply Last reply
                            0
                            • D Deeeds

                              @iTap-Development Sorry, what do you mean about custom particles? Precaching them by firing the particle emitter before needed?

                              iTap DevelopmentI Offline
                              iTap DevelopmentI Offline
                              iTap Development
                              wrote on last edited by
                              #14

                              @Deeeds it was just an example of something you could do with my idea. But what I’m saying is you could create your own particle by spawning all the of objects you need OFF SCREEN (instead of spawning as you need them, since spawning is a slower behavior) and then using broadcast message to have them do whatever it is you want for the particle. And you would probably want to name then numerically.

                              D 2 Replies Last reply
                              0
                              • iTap DevelopmentI iTap Development

                                @Deeeds it was just an example of something you could do with my idea. But what I’m saying is you could create your own particle by spawning all the of objects you need OFF SCREEN (instead of spawning as you need them, since spawning is a slower behavior) and then using broadcast message to have them do whatever it is you want for the particle. And you would probably want to name then numerically.

                                D Offline
                                D Offline
                                Deeeds
                                wrote on last edited by
                                #15

                                @iTap-Development Cool. Got it. For me, quite annoyingly, I can do this kind of looping in code quite elegantly, but really struggle with the mechanics and messy way it needs to be done in hyperPad. But really need to do this simply to overcome the lack of parenting and non-physical attachments and relationships between objects.

                                D 1 Reply Last reply
                                0
                                • D Deeeds

                                  @iTap-Development Cool. Got it. For me, quite annoyingly, I can do this kind of looping in code quite elegantly, but really struggle with the mechanics and messy way it needs to be done in hyperPad. But really need to do this simply to overcome the lack of parenting and non-physical attachments and relationships between objects.

                                  D Offline
                                  D Offline
                                  Deeeds
                                  wrote on last edited by
                                  #16

                                  @iTap-Development let me see if I've got this right:

                                  A loop broadcasts, in the loop is a call to a variable that's incrementing with each cycle of the loop, and being used to ID objects? What I'm missing is how the name/ID of the objects is created so that this name can be stored in an array or dictionary. The lack of ability to hold a reference to, or address of, an instance of an object is... troubling me.

                                  Jack de WildeJ 1 Reply Last reply
                                  0
                                  • iTap DevelopmentI iTap Development

                                    @Deeeds it was just an example of something you could do with my idea. But what I’m saying is you could create your own particle by spawning all the of objects you need OFF SCREEN (instead of spawning as you need them, since spawning is a slower behavior) and then using broadcast message to have them do whatever it is you want for the particle. And you would probably want to name then numerically.

                                    D Offline
                                    D Offline
                                    Deeeds
                                    wrote on last edited by
                                    #17

                                    @iTap-Development As is the lack, I think, of abilities to dynamically rename/name objects. I can't figure that part out, either. I'm missing something in conceiving how hyperPad handles spawning, and what it was intended to be and do.

                                    iTap DevelopmentI 1 Reply Last reply
                                    0
                                    • D Deeeds

                                      @iTap-Development As is the lack, I think, of abilities to dynamically rename/name objects. I can't figure that part out, either. I'm missing something in conceiving how hyperPad handles spawning, and what it was intended to be and do.

                                      iTap DevelopmentI Offline
                                      iTap DevelopmentI Offline
                                      iTap Development
                                      wrote on last edited by
                                      #18

                                      @Deeeds yep you could use a loop or create your own, I guess depending on you needs.
                                      So you are saying you want to have an array of the objects you’ve created so you know what to broadcast? I don’t think that would be necessary with numerically named id but if you want names like wall 1 or enemy 3 then I can see where that would come in. So if I understand correctly, just put id’s in an array when you create the objects.
                                      I don’t think anyone will argue that we need everything to be dynamic. I would honestly prefer dynamic everything came before new features, since no dynamic means less use for the features.

                                      Spawned objects are basically exact replicas of the object. They can, for the most part, work independently with the exception of not being able to be talked to by object name. Although you can use tags for limited use, for example put a tag on the object and then it or any of its spawned objects could have a collide behavior with that tag, and then when one collides only that one would react.

                                      D 1 Reply Last reply
                                      0
                                      • iTap DevelopmentI iTap Development

                                        @Deeeds yep you could use a loop or create your own, I guess depending on you needs.
                                        So you are saying you want to have an array of the objects you’ve created so you know what to broadcast? I don’t think that would be necessary with numerically named id but if you want names like wall 1 or enemy 3 then I can see where that would come in. So if I understand correctly, just put id’s in an array when you create the objects.
                                        I don’t think anyone will argue that we need everything to be dynamic. I would honestly prefer dynamic everything came before new features, since no dynamic means less use for the features.

                                        Spawned objects are basically exact replicas of the object. They can, for the most part, work independently with the exception of not being able to be talked to by object name. Although you can use tags for limited use, for example put a tag on the object and then it or any of its spawned objects could have a collide behavior with that tag, and then when one collides only that one would react.

                                        D Offline
                                        D Offline
                                        Deeeds
                                        wrote on last edited by
                                        #19

                                        @iTap-Development Cheers. I'll do some more mulling and experimenting. There are other things I'm doing and exploring and working around the ways of hyperPad, and with it... I agree... dynamic addressing needs to be first, before even functions, parenting, Undo in behaviours, etc.

                                        iTap DevelopmentI 1 Reply Last reply
                                        0
                                        • D Deeeds

                                          @iTap-Development Cheers. I'll do some more mulling and experimenting. There are other things I'm doing and exploring and working around the ways of hyperPad, and with it... I agree... dynamic addressing needs to be first, before even functions, parenting, Undo in behaviours, etc.

                                          iTap DevelopmentI Offline
                                          iTap DevelopmentI Offline
                                          iTap Development
                                          wrote on last edited by
                                          #20

                                          @Deeeds here are some screen shots from the tutorial with some basic explanations...hope it helps!0_1510510239477_23B51BFF-6BA1-4831-9B70-B4921379BCA4.jpeg 0_1510510327808_FD9D7265-DC28-4CA5-A6CE-5853273999C7.jpeg

                                          1 Reply Last reply
                                          1

                                          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