Save and load Sprite co-ordinates ?

  • You can edit the local storage directly in Chrome with the Developer Tools. CTRL-SHIFT-I then click on Resources.

    After opening the developer tools/console, were do I locate the file i need to edit-

    'http_localhost_50000.localstorage' ?

  • Click 'Resources' on the top bar and then 'Local Storage' -> 'localhost' on the left.

  • <img src="https://dl.dropbox.com/u/22173473/locstorage.png" border="0" />

    Can't see it? <img src="smileys/smiley9.gif" border="0" align="middle" />

  • Oh. Make sure you're viewing the localhost page when you open dev tools.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh. Make sure you're viewing the localhost page when you open dev tools.

    Ok thanks..its still a bit hard to read!

    ---------------------------------------------

    vtrix

    I couldn't incorp your example with my original capx, but I have put a smaller project together(because of the 'pin' behaviour)

    <img src="https://dl.dropbox.com/u/22173473/hashanimsplash.png" border="0">

    Capx

    Will keep you posted as it develops.

  • hehe great! :) you could also make that the poses are saved to a button that has the json string as var, so when you go over the button it loads its pose (maybe i try it), i also thought about making a simple animation system with spritebank, if you save for example every 10 milliseconds to an array, you could have a frame by frame animation system, but i think its better to wait on Spriter plugin for the real deal :)

    dont know what exactly didnt work, but its posible to do an action or function on each instance right after its loaded, you could for example

    save usephysics=1 var to the instance and activate the physics on that object right when it loads

    about the json difficult to read.., its harder because its a json from the hashtable with all poses, you can also save and write the json from 1 pose to a textfield(so you can copy the string) wich should be easyer to read

    i've been meaning to ask rexrainbow if it would be better to shorten the description names of spritebank to a minimum as it get big very fast with lots of objects..

    ------ example normal 1 object

    {"head":[{"x":452,"y":103,"width":62,"height":72,"angle":0,"opacity":1,"visible":true,"cur_frame":0,"cur_anim_speed":5,"inst_vars":[],"layer":0,"z_order":8,"cur_anim_name":"Default"}]}

    -----------shorten version

    {"head":[{"X":452,"Y":103,"W":62,"H":72,"A":0,"O":1,"V":true,"C_F":0,"C_A_S":5,"VAR":[],"L":0,"Z":8,"C_A_N":"Default"}]}

  • I created a looping animation (see the disabled group 'play animation....not used in this project')

    Its disabled in this capx, but it does actually work.

    To be honest...a lot of this stuff is quite new to me, but if you have any examples ,amendments post them so I can learn!

    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • yeah cant see it, dont have the data :)

    new version, its fun :)

    index

    capx

  • Yeh...I like the 'objectselector' lots of possibilities?

  • well you see what it does? it saves every pose to an objectselector (bad name) its better poseholder , and loads the pose when hover, its a more a direct feedback thing, instead of typing the pose

  • well you see what it does? it saves every pose to an objectselector (bad name) its better poseholder , and loads the pose when hover, its a more a direct feedback thing, instead of typing the pose

    I used an event that triggered every 0.2 seconds to play a basic set of animations, but it was very slow...your method works better/faster.

    Keep up the good work.

    'shortening the description names of spritebank to a minimum' would be a good idea as well.

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