LittleStain's Forum Posts

  • Have you checked the collision-polygon of your platform and your character in the image editor?

  • thanks for the replies, littlestain's method works fine, I might just test each one to learn. Just have to apply it to like 100 Sprites -.-

    I don't want to have a smaller layout size, I have done it like this to support multiple device sizes.

    Apply it to 100 sprites?

    Why would you have to do this?

    You have 100 completely different sprites on your screen?

    If so I would recommend using a family..

    If all sprites have the same behaviours and/or looks, why not just use 1?

  • To know if there's something wrong with your code, we'd need to see your code..

  • We use the expressions:

    CanvasToLayerY("layer-name",0,0) <-- Top of the screen

    CanvasToLayerY("layer-name",WindowWidth,WindowHeight) <-- Bottom

    CanvasToLayerX("layer-name",0,0) <-- Left

    CanvasToLayerX("layer-name",WindowWidth,WindowHeight) <-- Right

    This will reliably give you the edge coordinates of the screen in any "fullscreen mode." Just keep awareness of scaling of the layer involved. I typically use a 0,0 parallax layer such as "UI."

    Then just do what LS says above to keep it on screen.

    Why not use the viewport expressions?

    They do exactly the same..

    Using the (0) for layer zero (1) for layer 1, you can reference the correct layer the sprite is on so it will consider the scaling and paralax..

  • Sprite is dragging

    sprite set x - clamp(sprite.X,ViewportLeft(0),viewportright(0))

    sprite set y -clamp(sprite.Y,ViewportTop(0),viewportBottom(0))

    If you also want the sprite to keep the whole sprite within the Viewport:

    Sprite is dragging

    sprite set x - clamp(sprite.X,ViewportLeft(0)+0.5*Sprite.width,viewportright(0)-Sprite.width)

    sprite set y -clamp(sprite.Y,ViewportTop(0)+0.5*Sprite.Height,viewportBottom(0)-Sprite.Height)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Would it be possible to transfer the player movement to the enemy, or does the player have a completely different way of moving?

    By the way, you haven't responded anymore on the last thread I tried to help you, so I'll ask here:

    Was my advice/explanation in that thread of any help to you?

  • You could do this in many ways..

    Most important part would be disabling the solid behaviour on the layer you are not on..

    One of the things to look out for might be the enormous amount of graphic memory needed, but you could indeed solve a lot of that with the tilemap object and re-using a lot of sprites (only drawing them when needed)..

  • can you help me put buildings in like 3D ish like topview gta

    You have been given two examples on how to create the effect you were asking for..

    If you aren't able to implement one of these two into your game and/or don't understand how they work and can therefor not change them in a way that suits you, You might not be ready to create a game like the one you want to create yet..

    First you stand, then you walk, then you run, then you jump, then you fly and hopefully by that time you have also learned how to land or else you'll dive, fall and crash and start from the beginning untill you have..

  • your event is triggered every tick, so the timer is started every tick..

    Add a condition trigger once while true to the top event and put the on timer as a seperate event instead of a sub-event.

  • Like you said..

    You want to do this for each enemy..

    adding a for each enemy top-event with event 1 and 2 of your screenshot as subevents should do the trick..

  • Use: 'For each Enemy order by Enemy.ZIndex, descending'. Destroy your bullet, destroy the Enemy and add 'Stop loop'.

    That will order the enemies hit, and stop after the first one.

    Couldn't you just use Enemy pick top/bottom instead of using the order by z-index?

  • Set variable to sprite.uid?

    If you know which sprite you mean, you should be able to tell c2 which sprite you mean..

  • Not sure if it would work for your idea, but..

    I meant like this:

    https://dl.dropboxusercontent.com/u/485 ... Table.capx

    only three tiled backgrounds of 8x8..

  • I'm sorry, but the attached gif doesn't give any clear information..

    Black blobs on the left, a bit different black blobs on the right..

    From what you say it is text..

    I'm guessing you mean justified text?

    That option is not possible in the C2 textobject as far as I know..

  • I would opt for the 9-patch object and reuse it as often as needed..

    or

    create the lines (and background) with the tiled background object (which would only take two sprites of 8x8px)..