How do I change player's skin?

Get help using Construct 2

Post » Sun Feb 07, 2016 7:44 pm

Hey guys!
I tried to search for some topic, but none of them trully answered to my question....
I have 4 types of player's skin and I want them to change after reaching some score or after purchasing in the shop.
Do you have any ideas how to do that?

And another problem, can I do some random pick from 3 backgroungs on every start of the layout (something like flappy bird had)?

Thanks for all your answers and help. :)
B
10
S
1
Posts: 42
Reputation: 620

Post » Sun Feb 07, 2016 9:11 pm

Really depends on how you are changing the skin color.
on event trigger change.

also

on start of layout
Background choose(0,1,2)
where 0,1,2 are avaible backgrounds
B
29
S
13
G
10
Posts: 355
Reputation: 8,317

Post » Sun Feb 07, 2016 9:15 pm

Well, if your player has different animations like Stand, Walk, Jump, you can make it so the player has Skin1_Stand, Skin1_Walk, Skin1_Jump, Skin2_Stand, Skin2_Walk, ... Just do this for as many skins as you have. Make a new instance variable for the player called something like Skin. Then when the player reaches certain score set the Skin instance variable to equal Skin1, Skin2 or how many skins you have. When playing player animations you just need to put Player.Skin (the variable) & "_Stand" and so on.
Banned User
B
6
S
3
Posts: 105
Reputation: 1,170

Post » Mon Feb 08, 2016 4:26 pm

Thanks a lot guys! You helped me a lot! :) Now i see it wasn't that hard. I was just thinking too much :D
B
10
S
1
Posts: 42
Reputation: 620


Return to How do I....?

Who is online

Users browsing this forum: beohs, boybacteria, FabianB and 18 guests