Making player life

Hey, could anyone create or get me all the events,variables etc. That I would need for a player’s life. Like for if I would want the player to have two or three lives. Please I would be very grateful. And if you have time maybe help me with the events for an enemy that would fire at a player when the player is close to it. Thanks in advance. :confused: :slight_smile:

You are on the base platform where enemies can not kill you and you can do it without losing your life.

So you need to create a life for your character that is removed every time the character is ‘touched’

Is this what you need?

For life I can help you with the attack of the enemies instead I am also looking for a clear code for now I could not find anything.

The important thing is: When you kill the enemy, and when the enemy kills you?, you have to convert these conditions into GD events :slight_smile:

Yes I would be very grateful if you could help me out. I also have one question that I would like to know the answer, do you have to change the camera resolution or size if your making a game for android ? :confused:

Not necessarily, but if you want you can change it in the project settings doing a right click on the project (in the Project Manager) and select “Edit the properties…”:
If your game’s resolution is the same than the device’s screen, then the image won’t be stretched or with black/blank borders :slight_smile:

I can’t help you if I don’t know wich conditions do you want to simulate, I don’t know if you want to kill the enemy jumping over it, punching it… watching it angry?, neither when the enemy can kill you :neutral_face:

Hey, thanks but I found out a way already, I tried out a couple things and found the right one. But sadly now I’ve moved on to a another problem. Let me try to give it as briefly as I can, I’m creating a platform game, and on a new level I’ve created the platform goes very high up but the previous settings I’ve had for the camera doesn’t allow the camera the go any higher. So I’ve played around with everything pertaining to camera and found one event that allows the camera to go up with the player. But when I run a preview the game looks a little hard to play because the camera jumps with the player, that jumps really quickly. So the view is unsettled in action and just doesn’t seem quite right. What I wanted was the camera to only rise when the player reaches certain heights. Like say there is a ladder, I don’t want the camera to rise every step upwards on the ladder the player takes, I want it to rise like every four steps or three steps so it is less unsettled. And the same action goes for when it is going down. Is there a way to do this or something similar?. I know this is a bit much but please help me this one is really important. Please help. :frowning: :confused:

I really still need help. Please read my previous post. Please help :confused: :frowning:

What do you think about a camera that follows the player in the X axis, and also follow the player on the Y axis but in “steps”, I mean as those old adventure games, for example Another World, but the camera would jump only in the Y axis. If you use this system you have to carefully design the levels (as those old games do) so the camera steps always look nice.

Here is an example: (3.75 KB)
Press “G” during the preview to check the camera size and position. You just need the event 2 and the variable “CameraStep” actually, the rest is just the debug switching :wink:

That’s something close to what I want. But the camera would not change position that much. What I mean is the camera would rise a little higher as the player goes a little higher, and not change complete position, And the same goes for when the player is descending. So say the player is on the platform that I would consider as the floor,i would like it like this : at the bottom of the camera is the floor when the player is on the floor, but if the player jumps on a block that is slightly higher the camera would rise to a height that would make the block at the bottom of the camera. Please help this problem has been bothering me for a while now and is really slowing me down.

Hey could someone help me once more, with my previous post??? Please help.

Then maybe move the camera slowly following the player so the camera base is close to the player foots?, of course the camera should move faster if the player is going too far from the camera.
This means make the camera following the player on the X axis exactly, and follow the player on the Y axis in function of the distance to the player.

Check this (this .gdg file uses the same images than the previous example):
CameraStep2.gdg (21.7 KB)
If this doesn’t help neither, maybe a mix between the two examples is the answer: After some distance between the camera and the player, the camera will start to follow it slowly, but I have not a good idea on how implement it in a clean way (or any other way) right now :unamused:

I found it out. Thanks alot :smiley: