wretchedshark's Forum Posts

  • shinkan - there are no gaps when your tiled background scrolls off the screen and resets up the screen but the code doesn't "reset" the Y position of the tiled background using dt "set Y to self.y -1080"

    or is it because it's using it's current Y (which could be a float) that it is already accounting for dt upon resetting back up the screen?

    ...that gives me an idea

  • https://www.dropbox.com/s/9e25n03r576s24k/bringmewaterharry.capx

    unless i'm misunderstanding/missing something...

    (if you look at the example you linked, it looks like the dock sprite only goes to the water - there are missing pixels in the water animation covering the bits, so i kind of imagine they tiled light water and dark water, so it appears to be overlapping but is really just a tiled illusion)

  • - event 8 try replacing it with player - platform - is moving, inverted (platform is not moving). if you add a jump animation in later add another condition to that event as well "is not jumping".

  • - if your water on the left is made to look that way through opacity is it possible to just create an event where the tiles that overlap other objects opacity is set to full, thus creating that effect?

  • Alcemon - have you tried using UID's and a variable somehow?

    so something like:

    • spawn sprite1
    • set spriteUID to sprite1.UID
    • manipulate that sprite1 via sprite1(spriteUID).X (for example)
    • repeat the cycle

    is that what you mean or did i misinterpret? <img src="smileys/smiley1.gif" border="0" align="middle" />

  • ShabbyCat - if you have a whole bunch of "on start of layout" events and actions for each sprite you can stick them in the same "on start of layout event".

    eg.

    on start of layout

            > sprite1 destroy

            > sprite2 set opacity 50

            > sprite3 set x to 50

    • system compare varible1 - is greater than 1 (sub-event)

            > sprite2 set sprite2.angle to 90

    is this what you mean?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hexxiss - i think someone in another thread mentioned that global variables will persist in different layouts that that event sheet is attached too.

    as long as you don't have events that reset the global variable on the start of the layout or some where in the event sheet (unless you want something to reset them).

  • they are run from top to bottom

    i made a quick example to illustrate how it can affect things:

    https://www.dropbox.com/s/ehgkehunyg0d05y/decidingfactor.capx

  • i have visions of zombies swimming in my head imagining pathfinding + some way to do a circling behavior.

  • shinkan - appreciate the example, i was wondering if you wouldn't mind answering a question?

    if so:

    • your bg scrolls using dt but isn't reset using dt (as far as i can tell), is the tiled background somehow accounting for dt?

    (your obstacles don't appear to spawn stacked or in a row which is why i'm asking about the background <img src="smileys/smiley1.gif" border="0" align="middle" />)

  • I think you could use variables and UIDs too, containers seems like a simpler (nicer) solution!

  • Whiteclaws - it's how the platform behavior reacts in collisions.

    if you:

    • remove platform behavior from player sprite and add solid and physics
    • set gravity world to 0 at start of layout
    • and add solid, physics behaviour (and change to immovable 'yes') on blocks

    the "player" doesn't jump and is simply pushed.

  • ramones - i tweaked your capx to fit my idea of spawning as close as i could get it to act how i want it too, i think you are right about gaps.

    Rory - it seems that no matter what there will be gaps because the framerate is ALWAYS fluctuating (and therefore the gaps aren't even even). if there were some way to lock down the framerate to 60 or 30 for lower framerates, there might be a way to account for dt, otherwise nothing i can think of.

    you can subtract dt * groundSpeed from the X spawn point to get them to overlap, if you use large ground pieces - heightwise - with plain cover it's not noticeable. if you are doing a platform, gap, platform, gap loop then the player won't be out these pixels and miss a jump because the gap spawned slightly to large.

    https://www.dropbox.com/s/n8oyndhyz10ktdv/endlessRunner.capx

  • shinkan - i'd definitely like to see how you spawn your terrain if you don't mind!

  • Rhindon - it's ma'am! :]

    they filter the "on any key pressed" down further to which key is being pressed, i didn't test it with "is down" instead of it. so on s pressed you get the punching animation and on d you get the kicking animation (which in that capx is just a bunch of faces).