Character Control

Discussion in 'How Can I...?' started by PJamaLabs, Aug 2, 2017.

  1. PJamaLabs

    PJamaLabs Boxer

    Joined:
    Apr 27, 2017
    Messages:
    70
    Likes Received:
    13
    Hi,

    I am trying to figure out if something is possible in BB or not. If I explain what it is I want to achieve and then maybe someone could point me in right direction or just say no thats not possible.

    I want my character to move on tap.

    If character facing up and I tap they will move ... distance and stop.

    If I land on an action I want to be able to rotate my character 90 deg either clockwise or anti depending on which action.

    If my character is facing left and I tap then it will move left by ... distance.. Etc.

    Hope this explains what I mean.

    I just cannot find a way to 1. rotate character by 90 deg on action or 2 have a single tap and character will move x pixels in direction facing. All sounds very simple but in reality its not actually that easy :(
     
  2. Larry Pendleton

    Larry Pendleton Boxer

    Joined:
    Aug 2, 2018
    Messages:
    58
    Likes Received:
    10
    I am facing the same issue. I have 4 direction movement setup fine, but my character does not face the direction I move in. This should be easy, but I can't find a way.


    EDIT: Make an action with sprites facing the way you want your character to face based on that direction, then simply choose Character/Replace in the action drop down. DONE!

    Hope that helps.

    -Larry P.
     
    Last edited: Oct 14, 2018
  3. Josh (Nology Games)

    Josh (Nology Games) Avid Boxer

    Joined:
    Nov 27, 2017
    Messages:
    200
    Likes Received:
    155
    have you seen its a great video that goes into detail, and if you tweak it a little, you will get that of which you desire
     
    DanFarfan likes this.
  4. Larry Pendleton

    Larry Pendleton Boxer

    Joined:
    Aug 2, 2018
    Messages:
    58
    Likes Received:
    10
    Hi Tekanology, yeah I watched that, and even tried it. I had a couple of main issues, 1. I need 0 linear velocity, because I only want to move my tank, when I press a button, and 2. I believe is an angular velocity has zero effect on the default animation (face direction of the sprite).

    I also tried adding 6 advanced moves on the character 4 for movement, that would replace the linear velocity in steps of 28 pixels with a timeout of 0.034, and 2 for rotating, which would add 90 for a move right button, and -90 for a move left button. All my results for that showed the rotation fighting against the default animation.

    I have attached my bbdoc file, if you don't mind taking a look, I seem to be close, but still not getting the look I want.

    Thanks
    -Larry
     

    Attached Files:

  5. Josh (Nology Games)

    Josh (Nology Games) Avid Boxer

    Joined:
    Nov 27, 2017
    Messages:
    200
    Likes Received:
    155
    Do me a favour and send the BBdoc to discord@buildbox.com I will take a look when I get in front of the computer
     
  6. Josh (Nology Games)

    Josh (Nology Games) Avid Boxer

    Joined:
    Nov 27, 2017
    Messages:
    200
    Likes Received:
    155
    @Larry Pendleton buildbox2 is sadly limited in some ways and this may be one of those ways. However you have nothing to fear as we are not far off from getting 2D worlds in Buildbox 3 and with it, this issue can easily be solved with the nodes system which is an even more advanced system than advanced moves.
     
  7. Josh (Nology Games)

    Josh (Nology Games) Avid Boxer

    Joined:
    Nov 27, 2017
    Messages:
    200
    Likes Received:
    155
    Sorry that I took so long to get back to you, I have been busy with other parts of this forum. I highly recommend practising with nodes in Beta 3 as it will teach you some amazing tricks that you would be able to do in the 2D worlds.
     

Share This Page