-> System: Set Health to min(3, Health + 1)
Do the same for NicoBox.
Post your events for increasing the value.
You can use the min() expression.
Ex: Health = min(Health, 3)
This is what I get in the console:
Catalina, Safari 13.1.1
Develop games in your browser. Powerful, performant & highly capable.
Part 2:
https://www.construct.net/en/tutorials/add-playfab-cloud-storage-2482
I just tried selecting two characters, and after the first number then yes, the caret jumps to the end because you keep updating on every change. It's a rather cumbersome way to do the formatting. Do you really need to format it in place? There's probably a bunch of use cases that are going to make this awkward to get right.
That's what I tried. It works for me. Exactly how are you editing? Maybe repost what you've got.
I'm not seeing that. I can edit each number, and it updates correctly.
I was about to post almost the same thing, but one more change is needed - don't use =3, =7, =10. You need >=3, >=7, >=10, otherwise it doesn't pick up edits of the numbers.
You can use the JSON plugin to parse it, but you have a custom format, so you can't load it into an array or dictionary - they have their own specific formats.
construct.net/en/make-games/manuals/construct-3/plugin-reference/json
Dictionary format:
{"c2dictionary":true,"data":{"one":"some text","two":"some more text"}}
Array format:
{"c2array":true,"size":[2,1,1],"data":[[["some data"]],[["some more data"]]]}
That is not a C3 array structure. Make an array, get the JSON from AsJSON, and look at the format. You have to follow that same format for C3 to import it into an array.
Having said that. This structure doesn't look like it will map to an array anyway.
I've just added a tutorial/template to call a handful of commands to PlayFab for login, remote storage, and leaderboard support.
https://www.construct.net/en/tutorials/add-playfab-cloud-storage-2479
Member since 28 May, 2012