Adding Sprite on the fly

Get help using Construct 2

Post » Mon May 07, 2012 5:25 pm

HI all,
Can you give me help about adding sprinte on the fly:
exemple adding :
adding a picture after having some value in score{adding heard to explain that have a new live in my game.}.
B
5
S
1
Posts: 49
Reputation: 723

Post » Mon May 07, 2012 5:50 pm

to be more clear adding sprite means :
if my variable lives = 3 I will print           
if lives = 2 I will print        

===>sprite creation in dynamic it's related to lives variable.

thanks of help
B
5
S
1
Posts: 49
Reputation: 723

Post » Tue May 08, 2012 2:32 am

Seems like what you'll want to do is a for loop using your Lives variable. You can create a new sprite and position it next to the last one within your loop.

You might want to do that in a separate event sheet, where you can first delete all the existing sprites, then create new ones within the loop. You can then call that event sheet whenever a change is made.

There are other ways, that's just one.
B
126
S
7
G
4
Posts: 185
Reputation: 7,233

Post » Thu May 10, 2012 10:46 am

Thinks I have resolved this problem by using tiled background plugin and modify his width on evey tick system set width to lives * width of my backgroud element
B
5
S
1
Posts: 49
Reputation: 723

Post » Thu May 10, 2012 12:08 pm

Good idea.
B
54
S
28
G
18
Posts: 1,520
Reputation: 25,020


Return to How do I....?

Who is online

Users browsing this forum: YoHoho and 14 guests