How do I save animation frames

Get help using Construct 2

Post » Fri Oct 09, 2015 6:31 am

this is sample file
https://www.dropbox.com/s/4yfw5s6zmokop ... .capx?dl=0

in this file i m getting point and with point earned i unlock frame 2
now how can I save this unlocked frame
.
earned points i already saved
.
pls tell if their are any wrong thing i have done
Last edited by luckyrawatlucky on Mon Oct 12, 2015 6:38 am, edited 1 time in total.
Image
B
68
S
40
G
48
Posts: 680
Reputation: 34,066

Post » Fri Oct 09, 2015 11:41 am

Cant open your capx because you use C2 beta. But I think that you need to create variable and than set this variable to YourObject.AnimationFrame to save what frame is showing now, to stop animation on frame you just need to set animation speed to 0 and then to set animation frame to desired, to set animation frame to what is saved in variable - you need to set frame and just type variable name.
Hope this will help.
B
9
S
1
Posts: 65
Reputation: 861

Post » Fri Oct 09, 2015 12:15 pm

Image
B
68
S
40
G
48
Posts: 680
Reputation: 34,066

Post » Sat Oct 10, 2015 5:04 am

MadScientist wrote:Cant open your capx because you use C2 beta. But I think that you need to create variable and than set this variable to YourObject.AnimationFrame to save what frame is showing now, to stop animation on frame you just need to set animation speed to 0 and then to set animation frame to desired, to set animation frame to what is saved in variable - you need to set frame and just type variable name.
Hope this will help.



actually object has 6 instances and all instances has frames
Image
B
68
S
40
G
48
Posts: 680
Reputation: 34,066

Post » Sat Oct 10, 2015 11:13 am

help pls
Image
B
68
S
40
G
48
Posts: 680
Reputation: 34,066

Post » Sat Oct 10, 2015 1:04 pm

I guess I understand what you are trying to do, but you are trying to load a game from a slot, but you haven't saved anything to that (or any other) slot..
You do have a localstorage called "point_keys" but it's hardly any use in this case, because the variable points is already set to that before going to the second layout..
What you could do for example is use a dictionary object and set it to the framenumbers, save it to local storage and set the animationframes from that..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Oct 13, 2015 12:14 pm

not getting it
dont know about dictionery
Image
B
68
S
40
G
48
Posts: 680
Reputation: 34,066


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 7 guests