LittleStain's Forum Posts

  • From the manual - Browser object..

    On suspended

    On resumed

    Triggered when the page's visibility changes, or when a mobile app is going in to the background or foreground. When invisible or in the background the app is suspended: all events stop running and all audio is muted

    So it seems the app automatically stops all events..

    So it's impossible to keep the app running..

    What you could do is use the system time plugin, to detect at what time the app was suspended and use it again on resumed to make the events happen that would have happened during the suspended time..

  • You could try the debugger..

  • Browser execute javascript should work..

    But it might be better to create a custom plugin for it..

  • It's a question of picking..

    You can pick by comparison or by evaluate or random or pick all

    so on object clicked

    if object.animation = 3 - set animation to 1

    system pick all objects

    system pick random object - set animation to 2

    well something like that, but it would be much easier if you were a bit clearer on what you want..

    Should the animationchange be random, should the objects picked be random, how many objects should change animation, are the animations multiframe or could you just use one animation with frames, etcetera..

  • Just do it your way 360 times, instead of 1..

    Good luck..

  • Updated it a bit..

  • There is a new stable version 178, I suggest you update to that..

  • should be as simple as setting a variable on jump and resetting it on landed..

    So player is falling and variable is not set would be falling of platform

    and

    player is falling and variable is set would mean falling after jumping..

  • Someone made this capx with one possible solution, can't remember who..

  • system every tick - text set text: Sprite.Car.Speed

  • Try resetting all your global variables.. Once they change they stay changed while the program runs..

  • A lot can be achieved by scaling and rotating/mirroring sprites..

    Try to create the background with repeating sprites/textures as much as you can..

    Even "Big" game-creators do that as the picture of rayman shows in this useful blog-post

    Remember not to waste your memory

  • Yes you could set an imagepoint for each animationframe, which would mean setting it 360 times, or set it once on an invisible sprite..

    The effect would be basically the same (as in noone would notice) and it woulf be a lot less work..

  • Doing it your way would be something like:

    give the boat an instance variable: angleframe

    a key is down : set boat.angleframe to boat.angleframe-1

    d key is down : set boat.angleframe to boat.angleframe+1

    system compare two values: boat.angleframe=360 - set boat.angleframe : 0

    system compare two values: boat.angleframe=-1 - set boat.angleframe : 359

    every tick - boat set frame to: boat.angleframe

    Btw instead of making the firing point on every frame why not make an invisible sprite with the imagepoints in the right place and rotate it to the angle of the boat.animationframe?

    It would actually be far wiser to rotate your boatsprite itself instead of having animation for each angle..

    You could have a few frames to give the impression of 3D but this seems like overkill..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ah..

    I guess you want to move the sprite by setting it's position to touch.x,touch.y and while moving have it face in the direction you are moving..

    To do that you could give the sprite two instance variables oldX an OldY

    is in touch-

    sprite set value OldX : sprite.x

    sprite set value OldY : sprite.y

    sprite set position to : touch.x,touch.y

    sprite set angle : angle(sprite.oldX,sprite.OldY,touch.x,touch.y)