How do I change sprite image

Just started using Construct 2? Post your questions here

Post » Sun Dec 07, 2014 7:01 pm

Hi everyone !

I have charter in my game, how do i change image for him in game ? for example: if u will buy special item, charter will be red. but default he is blue. I tryed to add aditional animation to sprite with loop:yes, and in event sheet: charter.set animation. but it didnt work. please help !

P.S sorry for my worst english. i'm from Latvia
B
3
Posts: 6
Reputation: 187

Post » Mon Dec 08, 2014 1:17 am

if your character has animations you will have to create animations for each color, and change animations, not frames.
if your character is static change animation frames but set loop:no
Image
B
57
S
13
G
6
Posts: 271
Reputation: 12,103

Post » Mon Dec 08, 2014 10:18 pm

Hi !

I tried do animation frames. I added 2 frames,Finally i have 3 frames : 0,1,2 in 1 animation. Animation Loop: no. In game i do like this:
If webstorage.localvalue("charterstyle")=1 do charter. animation. set frame = 0.
If webstorage.localvalue("charterstyle")=2 do charter. animation. set frame = 1.
If webstorage.localvalue("charterstyle")=3 do charter. animation. set frame = 2
But it didn't work :( charter spawn only in frame 3. Please help ;(( :(
B
3
Posts: 6
Reputation: 187

Post » Mon Dec 08, 2014 10:25 pm

Animation speed 0?
Image
B
64
S
23
G
7
Posts: 1,483
Reputation: 10,827

Post » Tue Dec 09, 2014 3:06 am

Yes, I forgot that:>>> set animation speed to 0
Image
B
57
S
13
G
6
Posts: 271
Reputation: 12,103


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests