Size of Sprites

0 favourites
  • 5 posts
From the Asset Store
220 Food Sprites in 16x16 pixel size. Perfect for items for a retro style game.
  • Hey Guys

    I am not sure, if this is a feature or a bug, so I asking here if I am doing something wrong.

    The task is, to throw a Dart. To simulate the flight, I resize the sprite.

    When a new Dart is spawned, the Dart appears with the correct size, but the resize handling does not work as expected by the first dart. If you look at the textfield, you can tell, that the respawned sprite seems to have different width and height than the one on the screen.

    Here's the code:

    <img src="http://quak.laurig.de/dartBug.PNG" border="0">

    And the CAPX

  • Fixed

    Events work by filtering specific instances that meet some conditions. The actions then run for those instances only.

  • Hey THX

    I was somehow aware of this fact and thought I had covered it by the check for "Dart is visible" - but this seems to control the picking differently then the check of the state of an instance variable....

  • Well the way you checked it was not enough.

    'is visible' means the value visible of the sprite object is set to visible.

    Either small darts and flying ones are visible.

    But small darts made it also so throw was turned to 0

    And since throw couldn't be >=1 anymore, then the instances did not shrink anymore.

    Adding instances variables and checking them the way I did is the way for me to differentiate "States" in my instances.

    What do I want :

    For as long as it is flying, I want my Sprite Dart to shrink, giving the flight impression.

    When the sprite reaches a certain size, I consider it to be planted (different state). It just has to stand there for now.

    It's also the good time to check what zone it is colliding with for the score ^^

    You might also want to check out this topic (the whole topic is informative imo)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks again....especially for the link <img src="smileys/smiley20.gif" border="0" align="middle" />

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