Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Bolt: adding boost

Discussion in 'Visual Scripting' started by larppiiis_unity, Feb 13, 2021.

  1. larppiiis_unity


    Feb 13, 2021
    Hi, Can someone help with boost? I want to add to Bolt game boost that improves players jumping skills. I have already the item that player can collect.
  2. Haneferd


    Feb 3, 2018
    Do you mean like a double jump if collecting a boost item?
  3. Haneferd


    Feb 3, 2018
    I have created a double jump logic with boost as a trail after the player. Hope that will help.

    The visual script I am using, is Unity@s scripting in 2021.1 b5 ( I am trying to learn it myself), so if you are running Bolt, you neet to replace "If" with branch and "Vector.create" with "" in Bolt.



    A player with capsule collider and rigidbody2D
    One Graph at player
    Attached another child game object called Boost (Disabled), to give the boost visual effect under the players feet.

    Connected Boost as an object variable , so I can change when it should be active in the main logic

    Also have a Graph variable with pickedUpBoost (So if you already have a pick up boost logic, you can use that.)

    The Logic (Visual Scripting):

    1. Check if player is grounded, so that it only jump once.
    2. Check if player has picked up boost, so it can perform a double jump with trail effect. Remove boost (Only use once)
    3. Disable the trail if player is on it's way down.

    1. Check if player is grounded:
    I have used capsule collider, but if you are using other collider, you should change the collider types:
    The check if grounded is made as an Super Unit:

    2. Jump and also Jump if boost item is collected (Bool-value as you see ein the Graph Variables):
    The logic uses button input (Space-bar), and check if grounded. It then checks if you have collected boost item, if not..just do a regular jump. If you have boost item and are not on ground, activate boost-trail-effect, and remove the boost-bolean (Can only be used once):


    3 Check if player is up at top of boosting jump. And then disable the boost:

    So, hopefully this can be at any help. :)

    Happy game developing!