Create objects based on variables

Get help using Construct 2

Post » Mon Sep 24, 2012 6:38 pm

Hello guys!

I have this game, in wich you earn itens based on the amount of points you have. Those items are displayed at the bottom of the screen, side by side.

For example, player has earned 30 little ores, they are all displayed at bottom of the screen.

Problem is, I cannot think an easier way to do this. Let's say that he has 20 ores... Am I suposed to create 20 events for it?

My game is using a resolution of 800x600. The variable that controls the amount of items that the player won so far is called "Points".

To summarize, what I want to do is something like this:

For each point on "Points", spawn object "Ore2" at position Ore1 + 10 pixels, then, repeat until 30.

Glad if you could help!
Posts: 56
Reputation: 712

Post » Mon Sep 24, 2012 7:08 pm

I recomend you check the "space blaster game" example that comes with C2
there's a missile object that is a tiled background, and it's width changes everytime you pick another missile. might help you find a similar way of dealing with your ores
Posts: 32
Reputation: 1,089

Post » Mon Sep 24, 2012 10:48 pm

Wow, that worked quite well! didn't though of that.

Anyway, what if I want to implement a flash like effect, acting as a feedback to the payer, indicating that he earned an item?
Posts: 56
Reputation: 712

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests