display object only once - (using Webstorage)

0 favourites
  • 5 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • Hey gus,

    I would like to display an object at the very beginning of a layout BUT ONLY ONCE ! So when I quit my game a launch it again, the object doesnt appear on that layout because it was already viewed during the previous launch.

    Maybe something like a tutorial screen, it also does not appear everytime you launch some game.

    I guess it will be done with Webstorage feature but I dont know how.

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • should be something like:

    on the beginning of the layout if key does not exist show object and create key

    if key does exist - don't show object..

  • should be something like:

    on the beginning of the layout if key does not exist show object and create key

    if key does exist - don't show object..

    yes but it wont work when I close the app or game and launchit again right? because it wont remember that the key exists, the values will be default again.. thats why i think the Webstorage should be used but dont know how

  • The key that exists is a webstorage thing..

    on start of layout

    • webstorage: Local/session key exists

    -- don't show object

    -webstorage: Local/session key does not exist

    -- show object

    -- webstorage: Set local/session value

  • The key that exists is a webstorage thing..

    on start of layout

    - webstorage: Local/session key exists

    -- don't show object

    -webstorage: Local/session key does not exist

    -- show object

    -- webstorage: Set local/session value

    oh I see..alright thn I will try that, thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)