How do I make an award system?

Get help using Construct 2

Post » Fri May 02, 2014 9:28 am

I have an sprite with animation: a1 and a2. When someone reach an highscore of 5 points, how do i make the sprite to be on animation a2 and when the player have less of 5 points then the sprite will be a1?

(sorry my english, i hope you will understand me)
I simply love making games.
B
14
S
3
G
1
Posts: 28
Reputation: 1,016

Post » Fri May 02, 2014 9:41 am

Hi

Use the Set Animation

Manual Reference below

https://www.scirra.com/manual/115/sprite
Cyberphaze

What we build can never be destroyed
B
136
S
18
G
6
Posts: 37
Reputation: 14,759

Post » Fri May 02, 2014 10:12 am

I know that. but i don`t know how to set animation when the highscore is over 5 points.
I simply love making games.
B
14
S
3
G
1
Posts: 28
Reputation: 1,016

Post » Fri May 02, 2014 10:29 am

if it is a global variable the "score" then say
if "score > 5 then set animation 2
if "score <= 5 then set animation 1
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Fri May 02, 2014 10:52 am

it didn`t work. :( any other ideas?
I simply love making games.
B
14
S
3
G
1
Posts: 28
Reputation: 1,016

Post » Fri May 02, 2014 10:54 am

System -> Compare Variable -> score > 5 a2 else a1
Check the image below.
You do not have the required permissions to view the files attached to this post.
B
24
S
4
G
1
Posts: 177
Reputation: 1,827

Post » Fri May 02, 2014 11:13 am

it will not work only if you have another event in your code that sets animation 1 or 2 in other conditions.
so the system checks every tick the code and cancels the above that i told you .
example
if "right" is down play animation 1
if "left" is down play animation 2
so every time you press right and score is larger than 5 instead of animation 2 it will play animation 1 ;)
B
15
S
6
G
4
Posts: 277
Reputation: 3,948

Post » Fri May 02, 2014 9:15 pm

i have don it! thanks for help!
I simply love making games.
B
14
S
3
G
1
Posts: 28
Reputation: 1,016


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests