Need help with gravity and adding a health bar

hi I am using the latest version of game salad and I am using the trial version
I would like to know how to implement gravity so my character doesn't fly too high but just stays on the platform
and also how to add a jumping effect something like Mario....
another question I have is how to add a health bar so characters who are being damaged can lose health and die

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    @subboy1@gmx.com said:
    I would like to know how to implement gravity so my character doesn't fly too high but just stays on the platform

    Most people don't bother with the built in gravity settings - and instead use the Accelerate behaviour - this offers a lot more control, give the actor you want to be subject to gravity an Accelerate behaviour and set it to 270° and relative to scene.

    @subboy1@gmx.com said:
    and also how to add a jumping effect something like Mario....

    Momentarily give your actor some upwards thrust, so something like: When mouse is down change velocity (90° / relative to scene) to 800.

  • subboy1@gmx.comsubboy1@gmx.com Member Posts: 9

    I did what you said and it is flying down but how to I make it stay on the ground etc
    also I changed velocity to 90 but how to add to 800??

  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2015

    ...

  • subboy1@gmx.comsubboy1@gmx.com Member Posts: 9

    like the gravity is good my character goes downwards however I have a background
    where theres concrete I want it to stay on the concrete I was messing around with path find but I don't know what to input

  • SocksSocks London, UK.Member Posts: 12,822

    @subboy1@gmx.com said:
    I did what you said and it is flying down but how to I make it stay on the ground etc
    also I changed velocity to 90 but how to add to 800??

    When I said '90°' I was referring to the direction setting in the Change Velocity behaviour, '800' referred to the speed, change these values to whatever suits the particulars of your project.

  • subboy1@gmx.comsubboy1@gmx.com Member Posts: 9

    ok thanks I got it to work nicely however how to stop it from going far below the scene into the blackness where my character disappears I I want it to stay above the concrete not go below the concrete

  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2015

    @subboy1@gmx.com said:
    I want it to stay above the concrete not go below the concrete

    Use the collide behaviour.

  • GnarlyGnarly canadaMember Posts: 840

    Jamie C put a great 15 video in the learning GS section on platforms.

    You want collide behavior with floor (concrete).
    In floor actor physics make it non movable and fixed rotation.

Sign In or Register to comment.