LittleStain's Forum Posts

  • round just rounds the figure

    1.8 = 2

    1.5 = 2

    1.4 = 1

    3.25 = 3

    etcetera

    with multiplying I mean

    round(3.25487) = 3

    but

    round(10*3.25487)/10= 3.3

    this way you can work with decimals..

    without using this there is no way to be sure the exact number you chose will be reached, for even with 0.0000001 difference the computer will not accept it

    5.00000001 is not the same as 5 rounding the number will make it so..

    there's also floor() always rounding down and ceil() always rounding up..

  • If closing the game is actually closing the game and not just suspending it in the background, one of these plugins by Rex will help..

  • Example:

    Text set text : LayoutName

  • It should work as long as you don't have conflicting events..

    Very simple example using set position:

    https://dl.dropboxusercontent.com/u/485 ... e-tap.capx

    I guess the issue you are having is that the "on tap" is executed before "on double tap" is registered and as such the condition "is on floor" isn't valid any more when registering the second tap..

  • another option would be to set the text to choose(1,2,3,4,5,6)

  • would adding a "layer is visible" condition help to only spawn on the visible layer?

  • You are aware that you are spawning a sprite every tick, which is about 60 sprites per second?

    I guess what you'd like to do is X>mouse.x - set animation

  • Well like I said..

    My above explanation should work..

  • I'm guessing you are using the width to set the progress..

    If so, putting the origin of your sprite on the left would solve your problem..

    If not, please provide more information and if possible your capx..

  • I'm not able to see your image..

    But if I understand correctly it should be something like this:

    Your bullet should have an instance variable damage and your enemy an instance variable health

    bullet on collision with enemy

    • bullet.damage < enemy.health

    > set enemy.health : enemy.health-bullet.damage

    bullet destroy

    • else

    > set bullet.damage : bullet.damage-enemy.health

    enemy destroy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You probably need to use round(audio.playbacktime("music")) for it might not ever be exactly the amount you're aiming for..

    If you need smaller amounts of time multiplying before rounding might work..

  • Wouldn't using pick nth instance work for this?

    From the manual:

    Pick Nth instance

    Pick the instance at a given place in the internal list of picked objects. This is most useful used in sub-events to act on separate instances. For example, in a "Sprite collided with Sprite" event, Pick 0th instance and Pick 1st instance can be used to act on each instance involved in the collision separately.

    By the way, if you just use family on collision with family wouldn't both be affected (because both instances are referenced in the event) ?

  • I guess there is a thing called animation..

    WebGL would be the first choice..

    But if you want to have an effect without having an effect, best way is to fake it..

    If you can't get what you want using blend-modes and/or WebGl, animations seems like the way to go..

  • I might be dumber than I thought, but why would you want to store an array in a dictionary object?

    Isn't there a reason why they are two different kinds of objects, each with their own benefits?

    There is however a csv to array and csv to dictionary plugin, if that's what you are after..