achievements

Get help using Construct 2

Post » Tue Feb 12, 2013 2:42 pm

I want when my character take an object, it appears on achievements, but I don't have much idea of how to do it. I have looking for tutorials on this and not found anything. Are there any that I can serve? Thank you



example
B
11
S
4
G
1
Posts: 410
Reputation: 2,752

Post » Tue Feb 12, 2013 3:38 pm

You can try creating your own system or you can use something like clay.io which has an achievements system. If you do your own you need to define what they are, create the logic for them and come up with a system to store them. It can be done, but takes a bit of work.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Tue Feb 12, 2013 4:10 pm

I prefer to create my own system, I doubt it very difficult not? there any tutorials that go with it?
B
11
S
4
G
1
Posts: 410
Reputation: 2,752

Post » Tue Feb 12, 2013 5:37 pm

have you tried creating the logic for them using variables?

like player picks up the object > set globalvariableachieve1 to 1

compare - globalvariableachieve1 = 0 set animation to "notachieved"
compare - globalvariableachieve2 = 1 set animation to "achieved"

as long as you don't have something in your code that resets all of the global variable this could work well (like on start of layout reset global variable)
B
14
S
6
G
2
Posts: 136
Reputation: 3,210

Post » Tue Feb 12, 2013 7:22 pm

Have the capx done? :(
B
11
S
4
G
1
Posts: 410
Reputation: 2,752

Post » Wed Feb 13, 2013 8:53 am

I still have no idea how to do it
B
11
S
4
G
1
Posts: 410
Reputation: 2,752

Post » Wed Feb 13, 2013 11:33 am

Helppppp
B
11
S
4
G
1
Posts: 410
Reputation: 2,752

Post » Wed Feb 13, 2013 3:14 pm

Anyone?
B
11
S
4
G
1
Posts: 410
Reputation: 2,752

Post » Wed Feb 13, 2013 5:23 pm

Working with global variables is covered in the manual and the tutorials. I would highly advise going through them. The proposition here is to create a global variable for each of your acheivements. Define what has to be done to get each acheivement, then when the task has been accomplished, set the variable. Have code that reacts to the variable. You can then use something like the web storage object to save that info between game plays so the player still has their achievements. So here are the things to look at in the tutorials and manual:

Global Variables
Events and Conditions
Web Storage

That should give you enough to impliment it, you just have to come up with the actual logic and requirements of each acheivement.
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, Draconinho, luisgmolina, Magistross, nedzad, nimos100, R0J0hound, Rezzon71 and 27 guests