Checkpoint system in a platformer game [SOLVED]

For questions about using Classic.

Post » Tue Jun 07, 2011 6:04 am

Hi. I'm making a platformer exploration game, and I decided to have checkpoints since the levels are pretty big and stuff.
Alright here's what I have
A sprite of the checkpoint that turns on and off to let the player know they activated it
Health bar for the player
Checkpoint variables
So basically, the player dies, they gain back their health, and are teleported to the last checkpoint they touched. And there will be multiple checkpoints in the level, like 3 or something.
Here's a screenshot of the editor (I didn't make it refill health yet, as it only decreases to 0 as of now)

And here's what happens

As you can see, the player object just stops in mid air, it is where I want him to drop down from, but he's stuck in that position and can't move around no longer. Any way to fix this at all? Or is there an alternate event to move back to the checkpoint and still make the player active? Because from what I see, I can still change directions, its just that it seems like everything else in the platform movement behavior turned off. Any help will be appreciated, thank you.
B
5
S
1
G
1
Posts: 46
Reputation: 842

Post » Tue Jun 07, 2011 6:16 am

That is because you're now basically setting the position to the checkpoint when Eli is is "dead" and has check value greater or equal to 1 which means when those two are met it SETs the position constantly.

You need somekind of 2nd action or so like after "set position" put set value of Eli's health to 100 or whatever is the max :)

Sorry, a bit tired so I hope my post makes any sense
B
11
S
3
G
4
Posts: 622
Reputation: 3,186

Post » Wed Jun 08, 2011 12:08 am

[quote="Sagal":3ic8xt6q]Sorry, a bit tired so I hope my post makes any sense[/quote:3ic8xt6q]

Not really. Could you explain a little further? So far I only heard about adding another action.
B
5
S
1
G
1
Posts: 46
Reputation: 842

Post » Wed Jun 08, 2011 12:54 am

He means that event 26 is continually running, and continually putting your player at that location over and over again, every frame, because there is no other condition to stop it from doing so.

You need to break the chain so to speak. Add an action to event 26 that sets the player's health above 0. Then the next time the event comes up it won't run, and the player won't be put into that location again.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Jun 08, 2011 1:12 am

[quote="deadeye":3ftm9a5k]He means that event 26 is continually running, and continually putting your player at that location over and over again, every frame, because there is no other condition to stop it from doing so.

You need to break the chain so to speak. Add an action to event 26 that sets the player's health above 0. Then the next time the event comes up it won't run, and the player won't be put into that location again.[/quote:3ftm9a5k]

Oh, I get it now. Thanks, both of you. It works now, and learned a little more on the way.
B
5
S
1
G
1
Posts: 46
Reputation: 842


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: GameOverBeast and 2 guests