mindfaQ's Recent Forum Activity

  • You should start with a well laid out category and/or tagging system right from the start, or older articles will be pretty much as well discoverable as old topics in this forum here.

  • is for you, then

    "You can also control effect's parameter with LiteTween if you use this behavior by rex_rainbow.

    Tween2Effect by rex_rainbow "

  • Lerp calculates like this:

    lerp(a, b, c) = c * (b - a) + a

    ashley posted something about lerping with dt:

    https://www.scirra.com/blog/ashley/17/u ... delta-time

  • At least one parameter in your lerp expression needs to change (so either vary the starting value (set it to the current value for example) or modulate the last value). The way you have set it up now, it will stay at 50.

  • you can save a whole array under one key in LS, by saving array.asjson (which you later can load into the array again by the load from json action)

  • Would make sense to cache the item data (including data) in an object like an array, and just patch in the changes to the local storage (for example you could easily do a delete in the array, then save the array as json to the local storage with no worry that you leave empty spaces).

  • If your game is mostly single player and not super popular, I would not worry too much about a small percentage of potential "hackers".

    [quote:2jmj9z9r]As far as actual data protection, anything on the server is safe.

    No data on a PC connected to the internet is safe per se.

  • The probably better option would be to extend on LittleStain's code would be:

    pick all objects - set animation to "plain"

    pick nearest object

    object's animation name <> (not equal) "shine" " - set animation to "shine"

    This way it only set's it to shine, if it's not already shining.

    You can even take it further and lower the amount of computation C2 has to do, considering most of the times the nearest object doesn't change (this would only do stuff, when another sprite becomes the nearest object):

    localvar = 0

    pick nearest object

    object's animation name <> (not equal) "shine":

    -- set object's animation to "shine"

    -- set localvar = object.UID

    *(subevent of this one) pick all objects

    object.animationname = "shine"

    object.UID <> (not equal) localvar: set animation to "plain"

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • People tend to leave transparent borders around their sprites because of aliasing at edges when rotating the objects, so that's probably where you've got used to that.

  • This is how it gets exported for me: http://666kb.com/i/cydj1aee26l1mvjlz.png (bottom; so everything alright as it should be)

    I opened the images in the sprite editor and assigned the origin point to top left and positions and sizes correctly and everything lined up neatly. After saving, closing and opening everything still was correct.

    I guess you did try to open the images a second time in the sprite editor and checked out if the size is correct before and after saving?

  • There are transparent borders on the images, as I said. If you can post your png file or whatever here, we could see if that's the case there and try it with our Construct 2 programs if it does import correctly. So far the plausible explaination is that something went wrong when you created/saved the images with Photoshop.

    Sorry to spam, I now see that when I save the project, the images are getting saved with an extra transparent pixel that is inexistant when I import the picture as a sprite in C2. So my guess is, I only need to understand what creates this transparent 1pixel border.

    Doesn't happen with my C2.

  • SelectedUID should be a global or local variable, not instance variable of sprite, then it would work.

mindfaQ's avatar

mindfaQ

Member since 12 Oct, 2013

None one is following mindfaQ yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies