flemmig's Forum Posts

  • Yes I see thanks

    Will try to get this webstorage to work

    Must be doing something wrong in that

    My global is Score

    and my textobject is txtScore

    the sprite PlayBtn > Set local key "txtScore" to Score

    ( this should save the value am I right )

    in next layout 2 I have made a button to get the score for testing

    Button Is checked > system set value score to webstorage.localvalue("Score")

  • Hmm ..

    since it is global it is reset by system reset global variables to default

    So Im back to how to avoid it being reset, dont you think..

    If I could figure out how to save the Score value and load it after the reset..

    <img src="https://dl.dropboxusercontent.com/u/22406377/C2-save.jpg" border="0" />

  • Yes LittleStain

    But how is that done .. In each layout I include a Core eventsheet

    that holds the

    On start of layout > system reset global variables to default

  • Yes I have alot global values I reset on each layout start

    I guess I could use a local value for the Score but its easier

    to use the global through all events -

    Or maybe somehow save to webstorage and load the Score after my

    included eventsheet in where i reset the globals

    Tried this

    <img src="https://dl.dropboxusercontent.com/u/22406377/C2-save.jpg" border="0" />

  • Hi

    How can I keep my global Score value going from layout to layout

    since global are reset.. on new layout

    I see that the NEW r151

    has a new feature:

    New common expression 'AsJSON' and common action 'Set from JSON'. These allow you to take advantage of the savegame system to save and load individual instance states without having to save or load the entire game, as well as other useful things like setting one object's state to another's.

    Regards

    flemming

    New r151

  • Hi thanks for reply

    But the thing is that the idd is broken so it dont fill in all text

    objects, my 20 text objects iid goes from 390-398 401-412

    and it only fill the first.

    therefore I would like to use another way

    hope you see my point

  • I found this in a tutor

    where it loops with Array.At(Text.IID)and fill in the text objects

    form IID 1 - 20

    Can I somehow loop through the Text object names, eg TxtHighscore1, TxtHighscore2 ,

    TxtHighscore3, TxtHighscore4 .................TxtHighscore20

    :-) flemming

  • Hi

    Ive used the iframe_html_pode and all works fine

    except when export to cocoonjs

    How can I solve that ?

    Cheers

    Flemming

  • SUPER ... Thanks !!!!

    Got it running ... very helpful

    After the object is created with random frame I try to spawn

    a sprite slice..

    It almost work... but its not every time

    sometime it only spawns on 4

    maybe there is a better way :-)

    <img src="https://dl.dropboxusercontent.com/u/22406377/C2_random.jpg" border="0" />

    Thanks again

    R/

    flemming

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Could you please help me out with a little more in how to ...

    havent saved a variable before

    thanks for reply :-)

  • Hi

    I use the this for random frame in sprite

    set animation frame to round(random(20))

    How can I avoid getting the same frame twice

    eg I have 5 sprites on layout and want them to

    show a frame between 0-19

    but not the same frame more than once

    Update

    Found this tutorial but cant figure out to use it with

    a sprite .. it use a text object

    Random without duplicate

    Cheers

    Flemming

  • Hi

    Is there a way I can let player upload a photo from

    phone to a folder on my website running php

    and then get a sprite to load it

    then I could implement it with this highscore

    Highscore tutorial

    Regards

    flemming

  • Hi

    How can I set the gravity to decrease over time when

    hitting the ground so et ends at zero

    Cheers

  • Thanks for reply

    But would be glad for more specific how to

    If you got the time

    :-)

  • Hi

    Ive tied to explain my problem here..

    <img src="https://dl.dropboxusercontent.com/u/22406377/C2-posiition.jpg" border="0" />

    Regards

    Flemming