Repository navigation
How do i restart in checkpoint after death without resetting the camera level limits when changing the camera limit before dying after checkpoint? #386
Replies: 2 comments 2 replies
|
Well, the easiest thing to do would be to put a boundary setter at the position of the checkpoint.. |
|
On death the scene is reloaded, and the new player resets its limits to the level defaults in
var checkPointLimits = null
Global.checkPointLimits = [body.limitLeft, body.limitRight, body.limitTop, body.limitBottom]
if Global.currentCheckPoint != -1 and Global.checkPointLimits != null:
limitLeft = Global.checkPointLimits[0]
limitRight = Global.checkPointLimits[1]
limitTop = Global.checkPointLimits[2]
limitBottom = Global.checkPointLimits[3]I tested it on current It saves the limits at the moment you touch the checkpoint, so put the checkpoint after the boundary setter (or touch it again after the limits change). |
Uh oh!
There was an error while loading. Please reload this page.
hi, i've been wanting to do this for a long time now, when I change camera limits, you know when you get to the boss, and then you change boundaries, and when you die, the camera boundaries stay the same as the checkpoints you've been at last, so how do i do that in godot 4. because i've seen games like spark the electric jester 1 and freedom planet 1 & 2 do this.
All reactions