LittleStain's Forum Posts

  • Did you look at the tutorial section?

    https://www.scirra.com/tutorials/1137/fruit-machine

  • First of all I don't see an action where you set level value to 1

    second of all every tick system is in preview level value is set back to 0, so that might be an issue..

  • Seems pretty straightforward

    You want to compare if geolocation.longtitude is between a minimum number and a maximum number

    and if geolocation.lattitude is between a minimum and a maximum number

    if both these conditions are true you are within a certain square on the map..

  • idk, i even tried with pathfinding, but couldnt make it work. and pathfinding is not pixel perfect so its useless here.

    any idea how to make LittleStains example work so the character wont get stuck when hitting solids?

    this works very easy with using the keyboard. but with "Is in Touch" seems so tricky..

    It doesn't really get stuck..

    You want to move in the direction of touch.x,touch.y, but if in that direction it is overlapping I make the player move back in the same tick..

    Splitting up the x and y movement might end up more being what you would like..

    Not perfect yet, but improved again:

    https://dl.dropboxusercontent.com/u/485 ... ved-1.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I guess the easiest way would be comparing if the geolocation values are within a square using the "system is between values"-condition..

  • The first question is unclear to me..

    The second question could be handled by layers depending on how you have your game set up..

    Player on collision with monster

    system compare two values player.layername = monster.layername

    player destroy

  • I might be stupid, but if the nearest sprite for sprite1 is sprite2, wouldn't the nearest sprite for sprite2 be sprite1?

  • You should set the speed before setting the angle..

    Without speed there is no movement, so the angle of movement can't be set..

  • Probably the easiest way would be to clamp the players x-coordinate

    system every tick:

    player set x - clamp(player.x,viewportleft(0),viewportright(0))

    0 is the layer from which the x coordinates are taken.

  • A lot depends on how you have set things up..

    Usually an:

    player "on collision" with thing

    --player.y < thing.y

    thing move to object - in front : player

    else

    thing move to object - behind : player

    does the trick if before executing this triggered event the z-ordering is correct..

  • Thanks I heard the text object acts up can you do this with sprite font

    yep..

    same action..

  • Add a text-object

    system every tick

    text set text to : "Ammo Left: "& player.ammo

    assuming the instance variable is called ammo..

    You wouldn't have to set it every tick, offcourse, only when changed, but this is just an example..

  • why power of 2 is better for background or tiled background ?

    example ? please

    From the Manual

    Which you can visit with the link at the top of this page, by the way..

    Power-of-two sizes

    For best results, use a power-of-two sized square image for the Tiled Background (e.g. 16x16, 32x32, 64x64, 128x128...). This achieves best results in WebGL mode. The object will still work correctly with non power-of-two sized images, but the quality may be slightly reduced since the image has to be stretched to a power-of-two size before tiling. (Note this does not apply to Sprite objects, which can use any size.)

  • right click your event sheet and choose include..

  • Do as google does, slice it up in parts.

    Which will only help if you dynamically load and unload them from memory, right?

    Which construct 2 doesn't do as far as I know..

    All images on a layout are loaded into memory at start of layout..

    https://www.scirra.com/blog/112/remembe ... our-memory