dop2000
i added new key on start of layout
key 'Name' value 'Jon'
and
i try display in text, settext: Dictionary.CurrentKey & Dictionary.CurrentValue
text object on prewiev shows '0' ?
Dictionary stores data in pairs - key and value. For example: "Name": "Small sword" "Damage": 25 "Weight": 10 It's quite easy to use and everything is covered in the official manual. https://www.scirra.com/manual/140/dictionary Here is a lengthy tutorial: http://javajdk.net/tutorial/construct-2 ... -tutorial/
Dictionary stores data in pairs - key and value. For example:
"Name": "Small sword"
"Damage": 25
"Weight": 10
It's quite easy to use and everything is covered in the official manual.
https://www.scirra.com/manual/140/dictionary
Here is a lengthy tutorial:
http://javajdk.net/tutorial/construct-2 ... -tutorial/
thanks for http://javajdk.net tutorials
I search tutorials and find capx examples but they are advanced or intermediate level
dou you know any simple tutorials / examples to start learn?
i upload test game
https://www.scirra.com/arcade/other-gam ... test-27384
In preview every time when i turn off and run again gold variable are counting even if my app is off
but not in Arcade, why?
And what do you expect to happen? Here is a demo: https://www.dropbox.com/s/m61bf4o4tclbj ... .capx?dl=0 Run it. Change the date on your PC to tomorrow's date. Run again. Change the date on your PC to the day after tomorrow's date. Run again. Change the date on your PC to next week date. Run again.
And what do you expect to happen?
Here is a demo:
https://www.dropbox.com/s/m61bf4o4tclbj ... .capx?dl=0
Run it.
Change the date on your PC to tomorrow's date.
Run again.
Change the date on your PC to the day after tomorrow's date.
Change the date on your PC to next week date.
hmm maybe counting from date to date? ok i wil try, thanks
It's a demo... It adds this date to a timestamps and shows how many days in a row the app was running - "0" Then it adds another date and the number of days changes to "1". You will need to add a real date to the timestamp, every time your app starts.
It's a demo...
It adds this date to a timestamps and shows how many days in a row the app was running - "0"
Then it adds another date and the number of days changes to "1".
You will need to add a real date to the timestamp, every time your app starts.
i try add latest date and also add today date, nothing happen
If you are talking about sample capx from this page, just replace "Browser Log" with "Text set text"
ok i have this, but why text object shows me
''4.05.2015, 00:00:00: 0''
and nothing happen
just display this date only?
maxwell88 Capx example displays everything in Browser's console log. Press F12 in the browser, you'll see. As I understand, you need to do this: Every time your game starts, load Timestamp from local storage. Paste today's date, save timestamp to local storage (AsJSON). To get the number of days in a row your app was played, use DateInARow.ContinuousCount( ) expression.
maxwell88
Capx example displays everything in Browser's console log. Press F12 in the browser, you'll see.
As I understand, you need to do this:
Every time your game starts, load Timestamp from local storage. Paste today's date, save timestamp to local storage (AsJSON).
To get the number of days in a row your app was played, use DateInARow.ContinuousCount( ) expression.
What i should put in 'set text' in text object? to display in layout?
Develop games in your browser. Powerful, performant & highly capable.
Check out the Time Away plugin: You can use it to check how long the app was inactive and award a number of points depending on this time.
Check out the Time Away plugin:
You can use it to check how long the app was inactive and award a number of points depending on this time.
i dont understand 'date in a row'
capx example dont display anything
hi i try put new code to display timer : floor((gift_time_remaining) / 3600) & ":" & zeropad(int((gift_time_remaining)/60 % 60), 2)
but text shows me always 0:00 ?
I'm not sure that is possible, what's your goal?
its adding score when you dont play, ( but when you play you have possibility to gain more score)
How count and add/ substract one point to/from global variable when my app is turned off?
For example you want to add bonus score to player depending on how accurate the shot was. You can do something like this: Add Lerp(minBonus, maxBonus, accuracy) to TotalScore[/code:oou65wqp] accuracy should be from 0 to 1
For example you want to add bonus score to player depending on how accurate the shot was.
You can do something like this:
Add Lerp(minBonus, maxBonus, accuracy) to TotalScore[/code:oou65wqp] accuracy should be from 0 to 1
i dont get it, con you show this in capx example? or printscreen of code ?
Hello, i make simple aser pointer using sprite and pin that laser to image point of gun
https://www.dropbox.com/s/jkzjckv3b4rft ... g.png?dl=0
How do i stop laser on solid wall/enemy?
After installation addons .c2addon where i can find this files in construct 2 main folder?