How do I get a Sprite do disappear forever?

Get help using Construct 2

Post » Tue Nov 01, 2011 2:55 pm

Ive inserted a 1up sprite, but each time the Player dies the 1Up comes back again as well.

How can I get him to be available just one time?

Many thanks :)
B
18
S
4
G
5
Posts: 149
Reputation: 4,498

Post » Tue Nov 01, 2011 3:04 pm

Can't exactly tell what you mean without knowing how you've "programmed" it, but in any case, have you tried using the "run this once" condition? By the way it should be placed last in a condition...."box" or however this is called :-P
B
10
S
1
G
2
Posts: 47
Reputation: 1,615

Post » Tue Nov 01, 2011 3:14 pm

Set a global variable whenever you create it, and only create it if that global variable has not been set.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Tue Nov 01, 2011 10:44 pm

I'm such a noob LOL

I couldn't do what you both said to do.

here's my capx, can you help me with it?

http://dl.dropbox.com/u/1056957/1up.capx

thanks
B
18
S
4
G
5
Posts: 149
Reputation: 4,498

Post » Wed Nov 02, 2011 7:33 am

Here you go: Link

Instead of starting the entire layout from scratch, just create a new player.

edit: I just realised I broke your timelimit. Give me a second to unbreak it.
more edit: It should be fixed now. I'm working on the assumption you want the timer to reset each time you die so when you explode, you create a new player, and then manually reset the timer. Only when the player completely runs out of lives do we restart the level completely.plauk2011-11-02 07:51:01
B
28
S
7
G
7
Posts: 102
Reputation: 6,483

Post » Wed Nov 02, 2011 7:50 am

That should do

antiReSpawn.capx
Last edited by Yann on Sun Sep 14, 2014 11:37 pm, edited 2 times in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Nov 02, 2011 7:51 am

Haha yeah plauk don't restart layout but reset player position, nice idea too.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Wed Nov 02, 2011 10:56 am

@Plauk, Many many many thanks :)

You went way faar from what I was asking, 1Up and Timer as well.

cool :)
B
18
S
4
G
5
Posts: 149
Reputation: 4,498


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests