Disable Character Controls With Action

Discussion in 'How Can I...?' started by Phill Mason, Nov 9, 2017.

  1. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Hi folks, I have a game where I switch from left to right using the simple character switch button. It works great, kind of like a jump button, but with the switch. Here's the issue. I have a hole in one of my platforms and I want my character to drop through it and die.

    Problem:
    I've tried using an invisible action that the character runs into once in the hole. It's a game play action set to powerup and I can slow down the character (gameplay), set the character maximum movement etc, but I cannot stop it from switching at all. Problem is, I'm still able to use the switch control once I've fell through the hole and it's possible to get back through (up) the next gap in the platform (not what I want), so I want to disable it till I hit the bottom and die, but I can't find a solution.

    Q:
    Anyone got any ideas please, on how I could disable the switch button mid flow?
     
  2. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    I guess the only way would be to make a menu jump to an UI without the switch button. Have you tried that?
     
  3. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Great idea, @Christoph, I hadn't thought of that, thanks.......

    ...I had a play around with it and it works great by removing the buttons from a new UI, but it did not want to redirect to my original world. I awarded a coin and used menu jump logic to go to the new "No Switch" UI, once 1 coin had been detected. Then I needed to work on how to best remove that coin in order to back back to the original world, as I think BB was seeing that I had one coin and automatically placed me back into my new world with no switch and I couldn't move at all.

    Solution - I was able to get round this by adding another action that removed the coin (-1 coin) when I collided with the collision point that kills the character, after falling down the hole, this works great.

    Thanks again for the UI tip, all together with the actions, I was able to temporarily remove the character controls whilst watching him die and return to my main game with controls - perfect :)
     

Share This Page