How do I force C2 to delete one sprite if another is created

Get help using Construct 2

Post » Tue Sep 20, 2016 2:53 pm

So I want to have kinda like a summoned weapon and you can only have once at a time. How can I force C2 to just spawn another object if it currently doesnt exist, on in an extreme case, delete the old one in order to summon a new one.

Thank you
B
14
S
5
Posts: 252
Reputation: 1,713

Post » Tue Sep 20, 2016 2:56 pm

sprite.count expression should help you; if sprite.count=0 then create sprite else destroy sprite and create a new one
Image Image
B
26
S
15
G
142
Posts: 881
Reputation: 74,060

Post » Thu Sep 22, 2016 6:21 am

MadSpy wrote:sprite.count expression should help you; if sprite.count=0 then create sprite else destroy sprite and create a new one


Thanks! Always good to learn new stuff
B
14
S
5
Posts: 252
Reputation: 1,713


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 2 guests