Variables and date

Get help using Construct 2

Post » Fri Jan 03, 2014 8:36 pm

I try do calendar and its ok i create for each (date plugin) year, month, day, hour etc. text objects all displays ok.

Now i create button and when click i want save state (day, hour and minutes) to some variables.

I wants to get the opportunity to game remember the day hours and minutes BUT this must be checked when you turn on the game.
And other text objects must show saved date and show saved date when you run game again.

Im seeking solution of this second day and i cant solve this!
delgado2014-01-03 20:44:13
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Fri Jan 03, 2014 8:46 pm

I think saving the variables to webstorage would be your best bet.
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 » Fri Jan 03, 2014 8:54 pm

@LittleStain i use webstorage but prabably i miss something because it dont work i need fresh look at the topic and original solution
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Fri Jan 03, 2014 9:42 pm

@Rexrainbow I think i cannot save states from Date plugin for example if date.month is 1 (january) save this '1' to variable right?
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Sat Jan 04, 2014 8:00 pm

August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Sat Jan 04, 2014 8:08 pm

a better / more appropriate example ?

https://dl.dropboxusercontent.com/u/143636437/examples%20for%20web/simple%20save%20time.capx



click this save time ! link
alter (fake) time and enter some text ?

PRESS SAVE !

refresh page RamPackWobble2014-01-04 20:12:08
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Sun Jan 05, 2014 11:23 am

@RamPackWobble You forgot add date plugin to your example. Date Plugin should display date and time
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Sun Jan 05, 2014 12:27 pm

@Delgado, couldn't you use the example @RamPackWobble gave and adjust it to your own needs?

It shouldn't be too hard to do 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 » Sun Jan 05, 2014 5:12 pm

@LittleStain before i post this topic i have all what i need but i cant save date from 'date plugin' to global variable delgado2014-01-05 17:14:56
B
109
S
25
G
43
Posts: 1,883
Reputation: 33,553

Post » Sun Jan 05, 2014 5:56 pm

Could you explain what the problem is?

The capx by rampackwobble seems to work perfectly, but I understand it isn't suited for your needs.

You get your value from the date plugin and can get it to appear on screen, you said. If you can get it on screen, how come you can't get it into a variable?
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

Next

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 14 guests