How Can I Slow & Speed Character Only with Action Buttons?

Discussion in 'Buildbox General Discussion' started by Phill Mason, Mar 2, 2016.

  1. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Howdy folks, I'm playing around with trying to slow down and speed up my character with a couple of action buttons, but can only seem to affect the gameplay speed, which makes everything change speed too.

    Q: Is there a way to make only the character slow down with one button and then speed up with another? Thanks.
     
  2. andreas_kviby

    andreas_kviby Avid Boxer

    Joined:
    Feb 5, 2016
    Messages:
    170
    Likes Received:
    44
    Hey
    Is it possible to use the "transform" button maybe and put that under a button? With the transform you can affect the character right?
     
  3. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    I like your thinking :) but unfortunately, the Transform Logic applied in the scene editor can only affect assets and not the character. Thanks all the same.
     
  4. heathclose

    heathclose Miniboss Boxer

    Joined:
    Jan 28, 2016
    Messages:
    1,810
    Likes Received:
    1,026
    who did "monument drop"? the whole things slows like bullet time... pick their brain..
     
  5. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Hey @heathclose, Monument Drop uses the Gameplay action and it slows down the entire game, I'm trying to find out if I can slow down just the character. I'm thinking it might be all or nothing.
     
  6. heathclose

    heathclose Miniboss Boxer

    Joined:
    Jan 28, 2016
    Messages:
    1,810
    Likes Received:
    1,026
    Hmmm.... Like a quicksand button? Let me think on that one... I'm sure somebody will figure it out before I do... What about having that button spawn invisible physic object in front of you to slow you down? Just brainstorming....
     
  7. reegannaidoo

    reegannaidoo Boxer

    Joined:
    Dec 11, 2015
    Messages:
    87
    Likes Received:
    27
    Hey,
    So we haven't actually attempted a game like this, but we created a small demo to test this for you and we think this could possibly work....
    1. Drag two "Character buttons" on the UI, name one Slow and the other Fast
    2. Set each "Function" of the "Character button" to "Component Function"

    3. Select the Character you want to assign the buttons to.

    4. "Add Component - Advanced move" and name it Slow
    5. Set linear velocity to something silly like 3 or whatever you think is slow enough within your current game speed.... and remember to set speed on either the x or y axis, depending on your game direction of course.
    6. Under the option "Event" you will find the two buttons you created earlier, select "Button-Slow

    7. "Add Component - Advanced move" and name it Fast
    8. Set linear velocity to something cool like 20 or whatever you think is fast enough within your current game speed.... and remember to set speed on either the x or y axis, depending on your game direction of course.
    9. Under the option "Event" you will find the two buttons you created earlier, select "Button-Fast

    10. Add images in the button UI if you dont see them in the game test play
     
    Uemit Sevim and Phill Mason like this.
  8. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Hi @reegannaidoo, I think that option would work, but unfortunately my character is following a path, so there is no game gravity and if I apply and X or Y linear velocity, it throws the character off track and doesn't return to the games normal speed. I'm currently using a couple of action buttons on the UI and they work great, but only across the entire game and not just the character, which it what I'm really trying to achieve.
    I'm playing around with air drag to see if I can achieve anything with that. Thanks for chiming in :)
     
  9. reegannaidoo

    reegannaidoo Boxer

    Joined:
    Dec 11, 2015
    Messages:
    87
    Likes Received:
    27
    Hey,

    Ssssh... this is a hard one :(
    I tried my theory on a logic path and it works somewhat, the game play has 0 gravity.
    Slow Button:
    *When holding down the slow button the character slows down to the linear velocity set and this works GREAT!
    *however once you release the button the character jumps off the path.

    Fast Button:
    * Depending on how fast the you set the linear velocity the character either jumps off the path immediately or stays on the path for a short period while increasing speed, doesn't work so well as SLOW
    * however once you release the button the character jumps off the path completely

    *see attached video:


    I think this is a problem/bug within BB2, its works! just not 100%.
     
    Phill Mason likes this.
  10. Shawh

    Shawh Boxer

    Joined:
    Dec 14, 2015
    Messages:
    82
    Likes Received:
    41
    Not sure how you guys are using paths, but in Beta 3, paths are crashing the game every time. It's best to avoid them right now I guess.
     
    Phill Mason likes this.
  11. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Nice to see you did a video, cheers. I did try what you mentioned earlier in another project to test it out and there's no way you can use velocity, as the nature of the velocity is to send the character or an object on a trajectory in either the X, Y planes, so you will be forcing the character away from any set path.

    Actually, I don't dislike the idea of the entire game changing speed as it looks pretty cool, but I was hoping to be able to have a bullet fire across the screen and you have to decide whether to speed up or slow down to avoid it, with the bullet remaining at standard game speed - hence wanting to control the character speed only would be most ideal for this situation.

    @Andy, do you know of anyway to slow and speed up the character along a path with button triggers? Perhaps Nik had a play around with this when building Sky?
     
  12. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    I saw that you were experiencing crashes using paths, I am too, but I don't think that paths is the only reason for crashes, given there are so many other things that are currently sending BB2 into crash-land. I've deleted and moved paths and had crashes and then done exactly the same on another scene and it's been fine. I'm occasionally using BB2 inbetween BB1 projects just to learn the new stuff, but I'm patiently waiting for a more stable version before diving deep into a project. I'm on a Mac, what about you?
     
    Shawh likes this.
  13. Shawh

    Shawh Boxer

    Joined:
    Dec 14, 2015
    Messages:
    82
    Likes Received:
    41
    @Phill Mason On a Mac too, and I really hope that Beta 4 lets me use paths.

    Btw, the Gameplay you're trying to do is also possible with only one button in BB2, using the switch button.
     
    Phill Mason likes this.
  14. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Hey @Shawh the switch button won't work for what I'm trying to do, as it only allows to switch between two different states - button a and button b, so they alternate. I need to be able to provide the user with the option to slow down and speed up. Plus the switching option only allows control for linear and angular velocity and that doesn't work when following a path, it actually send you off the path.

    Hope you get to use paths soon. FYI, I'm using BB2.0 Build #898 and they do crash, but I am making a little progress inbetween crashes :)
     
    Shawh likes this.
  15. Shawh

    Shawh Boxer

    Joined:
    Dec 14, 2015
    Messages:
    82
    Likes Received:
    41
    @Phill Mason Ahh... I'll try it once the path gets fixed. But the gameplay idea is pretty cool :). Hope to see your game soon.
     
    Phill Mason likes this.
  16. Shawh

    Shawh Boxer

    Joined:
    Dec 14, 2015
    Messages:
    82
    Likes Received:
    41
    @Phill Mason You can try this. Not exactly slowing down, but does something similar, and doesn't break out of the path.
     

    Attached Files:

    Phill Mason likes this.
  17. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Cheers @Shawh, I'll download it and take a look thanks.

    It's funny you should pop up, I was just playing around with a pths test doc and as soon as I try and use any kind of jump up from the path, it crashes every single time and I wondered if you were experiencing that too? For sure the paths feature is shakey at present.
     
  18. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    What a surprise, that's also crashing on me now :) It did open the first time and I saw the character stop when I tapped the screen, is that right? I see the advance move was set to left with no velocity. Not sure I saw it properly. I'll play around with it some more tomorrow, cheers.
     
    Shawh likes this.
  19. Shawh

    Shawh Boxer

    Joined:
    Dec 14, 2015
    Messages:
    82
    Likes Received:
    41
    Hi @Phill Mason . You'll have to hold the screen to make the character move, and I wasn't able to make the character slow down, but only stop it when you release the screen(you can play around and maybe you'll be able to slow it down). These are the only two differences from what you actually wanted. And I guess this might not work on a bullet, but can work on something else.....
     

Share This Page