How do I make spawn opject with specific num of object

Get help using Construct 2

Post » Sun Jan 15, 2017 9:21 pm

hi i'm new user
and need some help to make a game like bbtan

i want when i press button spawn a specific num of object like i have a gun and when i press button i want to spawn 5 bullets all that in one press

can i make the event spawn object global variable

how to make the bullet when collision with another object to increase my bullet like a spawn 5 bullet in on e press when any bullet collision whith specific object make my bullet to 6 in the next press key
B
5
Posts: 9
Reputation: 243

Post » Mon Jan 16, 2017 12:40 am

when i press button i want to spawn 5 bullets all that in one press

When the objects are supposed to spawn, add a condition "Repeat 5 times", under that condition, add the action to spawn the objects.
Now 5 objects will be created.

can i make the event spawn object global variable

You can't create variables when running the program.
But there are enough other ways to get to your goal.

If you describe your problem more detailed, we might be able to help you with that.

how to make the bullet when collision with another object to increase my bullet like a spawn 5 bullet in on e press when any bullet collision whith specific object make my bullet to 6 in the next press key

Add a variable called e.g. "bulletSpawn".
use that for the number of repeats for the spawning action.
When you want to change the number of spawned objects, simply set the variable to a different number.

Or

You can create a function which repeats the spawning as many times as the Function parameter.
("Repeat [Function.Param(0)] times")
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091


Return to How do I....?

Who is online

Users browsing this forum: mikehive, plinkie, sublimate, Yahoo [Bot] and 6 guests