Respawning and other things

For questions about using Classic.

Post » Thu Mar 28, 2013 5:20 pm

Hello

I have more or less just started to learn the art of making games, and I'm having some difficulties figuring out certain things out. One of those things is respawning.

How do you do that? I guess it has something to do with the event sheets, right?

B
3
Posts: 3
Reputation: 331

Post » Fri Mar 29, 2013 12:42 am

If you want to restart the whole level, you can use the System action "Go To Layout" and go back to the layout you're on (layout 1 is 1 and etc)

Otherwise you'd need to reposition your object and reset any global variables to what you want them to be initially. Can you describe the style game you're trying to do a respawn in and I can make an example?
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Post » Fri Mar 29, 2013 10:13 am

Thanks for the reply.

I'm trying to make a plattformer and I would be more than happy if you could make an example. :)
B
3
Posts: 3
Reputation: 331

Post » Fri Mar 29, 2013 4:10 pm

I think you have to give more details about your "respawning system". If you want to reset whole level you can use "go to layout" as @Jayjay said. If you want to create a object when enemy died, you can use system action "create object" when enemy destroyed.

Here is my poor physic arrow example with respawn enemy. Hope this can help you.
https://www.dropbox.com/s/eoxyzt9hfq6oc6s/Arrow.cap
B
7
S
2
G
1
Posts: 21
Reputation: 692

Post » Sat Mar 30, 2013 12:26 pm

My goal is to make my character respawn from the beginning of the level if he falls down a pit of get hit by a enemy.

I have more or less been copying the "Plattformer School" way of making event sheets, so I have made two sprites. One of controls and one for animation. It looks something like this:

Main:

1. Start of Layout: Character: Send to front
2. Always (every tick): Character: Set position to Object player(image point 0)

Animation:

1. Player 1 "D" is down                    :Character: set to 0
   (invert condition) Player 1 "A" is down

2. Player 1 "A" is down                    :Character: set to 180
   (invert condition) Player 1 "D" is down

3. Player is walking:   character: set animation to "Running"

4. Else: character: set animation to "Standing"

5. Player is jumping:   character: set animation to "Jumping"

6. Player is falling:   character: set animation to "Falling"
B
3
Posts: 3
Reputation: 331


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests

cron