Spawning the player in Different Spots...

For questions about using Classic.

Post » Mon Mar 19, 2012 3:08 am

As the title says, I'm trying to spawn the player in different spots. What I mean by this is that the player starts out at the beginning of the level normally, but in my game, there are secret areas. Once they leave the secret area, I would like them to spawn near the end of the level instead of at the beginning. Think Mario and the pipelines.

But so far, I'm completely baffled on how to do this. Because spawning the character at the beginning of the level is done by placing the sprite there, but I can't think of any way to change that specifically for when the player leaves the secret area that actually works.

Any idea on how to do this?
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Mon Mar 19, 2012 5:42 am

Have two variables, one for X position and one for Y. When the player enters the secret area add the XY position you want the player to end up at to those values. When the player leaves the area, place him using those variables.
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Tue Mar 20, 2012 3:32 am

That sounds very plausible, and it shouldn't interfere with the other events like my attempts, so I'll give that a shot now.

Thanks for the response! :)
B
16
S
2
G
1
Posts: 156
Reputation: 2,112


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests