GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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.Posts: 12,822Member

    @[email protected].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.

    @[email protected].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.

  • 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.Posts: 12,822Member
    edited August 2015

    ...

  • 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.Posts: 12,822Member

    @[email protected].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.

  • 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.Posts: 12,822Member
    edited August 2015

    @[email protected].com said:
    I want it to stay above the concrete not go below the concrete

    Use the collide behaviour.

  • GnarlyGnarly canadaPosts: 840Member

    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.