Need help with gravity and adding a health bar
subboy1@gmx.com
Member Posts: 9
in Tech Support
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
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.
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??
...
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
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
Use the collide behaviour.
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.