How do I Test values

Get help using Construct 2

Post » Thu Sep 17, 2015 7:44 am

I want to make it so when I press a button in the game, it spawns a little creature, and after 6 are spawned, it doesn't spawn anymore.

In normal programming I'd use if/else statements, but I have no idea how to do it in Construct 2.

Anyone?
B
6
S
1
Posts: 46
Reputation: 492

Post » Thu Sep 17, 2015 12:38 pm

in your game the creature have pathfinding behavior?
B
15
S
7
G
7
Posts: 201
Reputation: 5,277

Post » Thu Sep 17, 2015 1:09 pm

Image
B
15
S
7
G
7
Posts: 201
Reputation: 5,277

Post » Thu Sep 17, 2015 2:17 pm

Might even be easier:

On button pushed
system compare two values : sprite.count < 6
> system create sprite

this would limit the amount of sprites to 6, but when one is destroyed another can be made by clicking the button.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Fri Sep 18, 2015 6:37 am

LittleStain wrote:Might even be easier:

On button pushed
system compare two values : sprite.count < 6
> system create sprite

this would limit the amount of sprites to 6, but when one is destroyed another can be made by clicking the button.



This worked, thanks so much :)
B
6
S
1
Posts: 46
Reputation: 492


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests