shirokuma's Forum Posts

  • Sure... There are 2 events.

    With the first event:

    With evilFly | X >= WindowWidth - floor(Self.Width/2)

    I'm saying with evilFly's X value is equal to or greater than the width of the window, less half of the width of the width of evilFly.

    The Self.Width/2 means half of the width of evilFly. I'm using half of evilFly because evilFly's origin is in the center. So by subtracting half the width of evelFly I'm reversing evilFly's direction while evilFly is still completely in the window.

    The floor() is in there so that if there is a remainder when I divide the width of evilFly by 2, any remainder will be dropped.

    So when this event happens I change evilFly's Bullet angle of motion to -180, which sends it to the left. By the way you don't need the "-". If you use just 180 it means the same thing. I accidentally left the "-" in there.

    So with the event:

    evilFly | X <+ round(Self.Width/2)

    I'm basically doing the same thing for the left side. I could have used floor() here instead of round(). In either case evilFly would reverse direction while completely inside the window.

    So when this event happens I change evilFly's Bullet angle of motion to 0, which sends it to the right.

    By the way, I have a Bound to layout Behavior on evilFly. It's not necessary. It's just another one of those things I accidentally left in.

  • I was born in the US, but I'm an anjing kampung. My ancestor's slept with anyone.

  • See if this helps:

  • - I just enjoy trying different foods. (Especially if it's fried!)

  • It may have some issues depending upon exactly what you looking for, but maybe this will get you started. I used Touch instead of Mouse.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here you go. Keep in mind that the top of a jump also counts as the start of a fall.

  • It can be set up something like this:

  • Mazdakfx

    Here is getting and setting the animation frame. It's not quite right. I'm not adding the 1 frame at this point as if the sprite happened to be on the last frame when it hit the blue box just blindly adding 1 to the frame might cause a problem. So there will need to be a little more logic added. I'm at work right now so I don't have time to mess with it. I'll let you play around with it.

  • Mazdakfx

    Yes, I think the animation starting from 0 as it enters a new layout is causing some of the player flicker. You probably also want to make sure that the player sprite is the same Y value in relation to the floor in each of the layouts.

  • Here it is going to random Layouts. I removed everything from the Layouts as any difference between where you leave a layout from where you enter a layout will make it obvious. There is still a flicker in the player, but that could be handled by getting the animation number from the sprite when it leaves a layout and starting it on the the next frame in the next layout.

  • Mazdakfx

    Is this layout change fast enough? Just let the character run. You will see a little blue box. Let the player hit the box.

    I didn't change too much in you code. I'm not certain why some things were done they way that they were, so I didn't want to change things until I understood your code better.

  • - Thanks... I take Pangsit Goreng for donations!

    Tarkion - Thanks... I take Tapas for donations! Croquetas being my favorite!

  • Here you go:

    On the start screen I have some invisible text that I display your score if it's not the first run of the game.

  • I don't see anything from what I can see of your code. I might be tempted to a sub-event on your System > BricksNumber = 0 of System > Trigger once while true, and place the System > Take snapshot of canvas... as an action under that sub-event. But I think that is kind of grasping at straws...

    It's not one of those Doh! type things like the Snapshot sprite has it's Initial Visibility set to Invisible... or the Snapshot sprite is under a Layer that is set to Transparent No...

  • Mazdakfx - Thanks, I'm glad you like it.