kaiko's Forum Posts

  • im setting a bunch of variables from an array in a for loop but some of the variables are empty and i cant figure out why.

    code:

    array data:

    anybody has an idea on what is wrong?

  • i have a project created with older version of c2 that used webstorage, this works with latest release if i leave code untouched but if i try to copy code to new project it wont work, so it seems i have to ditch that code for localstorage plugin,kinda sucks webstorage was easy to use, required less code and more apropriate since i only want to store session parameters.

    how do you store session parameters with localstorage?

    keep deleting them on every launch?

  • there must be a work around, how can you display 40 different images fetched dynamically without creating 40 objects on stage?

  • sorry but i am using an array, the problem is that createobject doesnt create a unique object, so when i load image from url, all game_icons get this image., since im creating a menu with different icon for each game ,now i get same icon for all games.not exactly what i want

  • in my previous projects i used webstorage plugin and it worked great.

    but now in version r206 its been depracated

    and i cant even get localstorage to work,when i debug, i see it working correctly but it never writes to the browser,when i monitor in developer mode in chrome i cant find the key i set in localstorage,

    when i load an old .capx file that used webstorage the plugin is still there and working, but not in my new projects.

    whats the trick to get it working?

  • good question!

    i guess it depends what you're trying to secure?

    currently i don't know any way to protect a webstorage value from modification,

    but as aleays in client/server architecture, never trust the client

    you could hash the value with md5 or similar but it all depends on what you are trying to achieve

  • i have several buttons and i want the buttons to have several different states without having to' write' same code over again

    my buttons are sprites btw

    states are:

    *enabled(btn sprite frame 1)/ disabled(sprite to frame 0)

    *pressed/clicked(button sprite switches to to frame 2 for a few miliseconds)

    is there any way to do this without having to 'write a bunch of code for each button?

    i would like to be able to set btn1.disabled , and the software should automatically set the sprite to frame 0since im gonna have many buttons , i want to avoid writing this for every single button,is there a button plugin, that can help me out?

  • exactly , even if i understand the need to save memory, there should be a way to override the save memory feature to make more dynamic content, your example with profile pics is an excellent example of why said function should work.

  • thanks but when i try that c2 gives me a error message:"J needs an expression after it"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • the code is as follows:

  • sorry there was suppose to be an image with the code attached but i fail to find the upload pic button anymore, has it been removed?

  • i'm doing a for loop to dump some data into an array(games)

    the storage.get function requires a string as parameter

    but data in storage are actually number for this field

    i set var tmp_j as text

    but i fear that loopindex("j") returns as a int and that the rest of my code stops working, the array becomes correct for the first loop(0) but does not work for the rest,

    any ideas on how to pass ints to strings in functions?

  • troublesum: how can we get your plugin to be part of C2 default package?

  • troublesum: never mind i got it working now, thanks your plugin rocks.

  • troublesum:how to debug your plugin?