Player not respawn, but moving back to the startpoint
Hi,
i want that if the player lost a live, he moves back to the start point in the level (moving with a constant speed). So the startpoint is in each level the same.
So if i use
"Change Attribute" = Lifes -1, then move to
doesn't work
i want that if the player lost a live, he moves back to the start point in the level (moving with a constant speed). So the startpoint is in each level the same.
So if i use
"Change Attribute" = Lifes -1, then move to
doesn't work
Comments
All attributes are (real).
But it doesn't work.
Also I didn't want, that the actor will respawn at the starting point. He should move (fall down) to the starting point.
1) Type in what you want the figures to be directly in the attribute or
2) Change these attributes self.startX and self.startY to self.positionX and self.positionY of your actor right at the beginning of your rules (these will record the starting position of your actor)
And yes, if the scene is 1500px high, it can fall down to the set pixel position if you use interpolate
I have a vertical scroller, and made it without the Control Camera, with moving th ebackground. So if I am on position for example 330, then the player doesn't fall back to 160 of the scene.
Move atribute:
Angle: [doesn't matter what]
Speed: 0
Then use 2 interpolate attributes:
Interpolate: self.position.X
to startX
Duration: [for example 1 second
Interpolate: self.position.Y
to startY
Duration: [for example 1 second]
Hope that helps.
Lump Apps and My Assets
But the player doesn't fall back to the point of the scene.
So for clarify:
I set up the scene with a height of 1500 px.
So the startpoint is 160x160 px.
I add four buttons for moving. Each change an attribute, when tapping.
In the player actor, there is then the command if attribute has the direction, then move to the direction.
I didn't change anything in the player-actor velocity.
Also i didn't use the ControlCamera...
Maybe I do something wrong?
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Now it works generally. But the fall-speed should also be the same. Even if I am for example 300 or 1000 Pixel high. How can I do that?
Also my player ist just going each time a bit high, till he reach the camera-rectangle. But I want, that if he moves high, only the background moves and if the player moves right and left, then he should move (what he still do...).