jeffige's Forum Posts

  • Smileh

    Another way would be to add another layer, or 2...set invisible - set objects collisions on that layer to disabled.

    When your player gets to that exit, create a transition (like you would normally to go to next layout.) And then set the layer he just came from to invisible and destroy all the objects on that layout

    Set that bottom layer to visible - objects collisions to enable.

    It would be a lot of events and actions, but you could do this for a lot of maps.

    If player is on layer "map bottom" destroy objects on "map top".

    Then once your player gets to the exit to go to third map...create objects at their X and Y position. You'd have to put each object in the editor and record their position in the event sheet.

    Event Sheet - Map 3

    Player is on layer bottom - condition - player is overlapping exit box > System - create object > x on layout "map 3" at x and y position.

  • pedroRocha thanks for the tip. Got it working.

    Buy if you add the system wait action to both event sheets, now the boxpin (blue sq) won't get destroyed. It stops at the bottom of the layout.

    And the starpin (blue star) on layout 1 gets destroyed outside of layout.

    I'm sure it has something to do with the pin behavior and the position of the object it is pinned to.

    Still trying to figure that one out.

  • pedroRocha Thanks for the reply.

    I thought of that, and it would be perfect. Problem is, the star is the only thing that should get destroyed.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Every random (1, 2.5) secs the system spawns a box. This box starts just outside the top of layout and travels at 90 degrees.

    I'm trying to get this box to spawn a star once its created and pin the star to the box so it moves with the box.

    When the layout starts there are about 20 blue boxes, which have spawned the stars. Those stars move with the boxes just fine. But once the boxes get destroyed outside of layout and more boxes are created, they do not spawn the stars.

    I've ran the game in debug mode and can see the boxes and stars getting destroyed. Also, the boxes are being created like they should, but they are not spawning the stars.

    Any ideas? Any input is very much appreciated.

    capx example -- https://www.dropbox.com/s/md6dqjlexsty1gm/pinn%20to__.capx?dl=0

    2 different layouts with the reverse behaviors. Still will not pin together. Can someone explain why?

  • Just have 1 invisible box. On collision go to 'next layout'.

  • Enemie 1 > is on layer x

    Player 2 > is on layer x

  • Thanks for the reply.

    I was thinking about doing it kinda like that, but with the disks. Creating a round circle a few pixels larger than the disks on a lower platform with solid behavior.

    Than if ball is offset from the disks, enable solid behavior on the circles.

    But that's too many events. The disks themselves have a lot of evets/actions. Creating, movements....etc.etc

    I'll try your way first, since it should only take a few events/actions.

    Again, thank you for the reply.

  • In my game you have to roll a ball around on disks. If you are not 'overlapping' a disk you fall off. I'm having trouble trying to get the overlap correct.

    As you can see in the image, the ball will hang onto the outer edge of the disks. This looks wonky. The ball should fall off if it hangs off the edge more than half its width.

    I have tried the 'overlapping at offset' to try and get the ball onto the disks more but then the ball will fall through the outer edges of the disks. As if it is dissolving through them. Again, that looks wonky.

    The disks have bullet behavior only. Physics slows everything down too much, and solid pushes the ball off the disks automatically. The ball itself has 8 direction.

    If anyone knows some tips on how to get this right, it would be greatly appreciated.

  • Layer - 0 make the background color Brown, like the color of the doorways.

    Layer - 1 create storefronts > sidewalk.

    Layer - 2 create the trees.

    Layer - 3 create the road.

    ---

    Layer - 1 Add by standers 1st. Then a player on that layer.

    Layer - 3 create 2nd player.

    Create enemies, animations on their respective layer.

    For a 1 player game - start them on the road. If the want to move to the side walk > push up on the controler > move player to layer 1.

    May have to mess around with it a bit. Especially the solid trees so the player doesn't morph through them.

  • 99Instances2Go

    I was so worried i wouldn't be able to figure this out, making me rethink and edit almost my whole game. Exactly what i needed.

    I LOVE YOU

  • Just added a capx example with tilt and keyboard support, to get a better understanding of what i mean.

  • Thank you for the reply R0J0hound but that's not what i need.

    Example: if you are pulling a little red wagon and a squirrel runs and jumps onto that little red wagon and stops, the squirrel's angle and speed will change to that of the little rd wagon.

    My wooden disks move at random angles and speeds. The player must tilt the device to roll the ball around while staying on top of these disks. If he falls off the edges of the disks, it's game over.

    Right now, if the player is on top of a disk and stops tilting the device the ball stops moving, it stays in that exact X and Y location while the disk keeps moving on its current path, and does not move again until the player tilts the device to move the ball again.

    capx example https://www.dropbox.com/s/6t3i4sr6obi0sde/Ball%20on%20Sq_001.capx?dl=0

    I need it so if the ball is on top of a disk and the player stops titling the device, the ball will continue to move with the disk. I'm sure it has to do with something like:

    Ball - overlapping disk

    Touch -gamma is 0 > ball - set speed to disk.bullet.speed

    Ball - overlapping disk

    Touch -gamma is 0 > ball - set angle to disk.bullet.angle

    Or something like that. I just can't find any posts, examples or tutorials and i can't figure this out.

  • Still trying to figure this one out. No examples or tutorials. Old posts have dead links.

    Open for suggestions.

  • Each wooden disk in my game moves around at random angles and random speeds. The ball rolls from disk to disk.

    Right now, the ball doesn't move with the speed and angle of the disks. If the device is not being tilted the ball will stay in that position, and the disk will continue moving at its current speed and angle, leaving the ball at its current position.

    How can i move the ball at the speed and angle of the disk that it rolls onto, if there is no tilt registered?

    Pin doesn't work, there's a fraction of lag between the tilt and the ball movement.

    Can someone please help. It will be greatly appreciated.

  • On start of layout there are several wooden disks created at random locations with bullet and destroy outside layout behaviors.

    There is a Gold disk with only the fade behavior created at center of layout, then the ball which has 8 direction, fade, destroy outside layout behaviors on top of this disk.

    When the ball rolls off this Gold disk it fades with 'set size' Starter.Width -1, Starter.Height -1, and the player then has to keep the ball on top of the wooden disks by tilting their device. If the ball rolls off a wooden disk it gets - 'start fade' -- 'set size' > Silver.Width -1, Silver.Height -1.

    All of that works great.

    The problem is, when the player dies and the layout restarts, the 'fade' and 'set size' actions will sometimes run on the ball. The Gold disk is still there, till the ball is destroyed after fade out, then the Gold disk starts its fade.

    It seems that if the layout is run each time the ball will stay on the Gold disk, and the fade/ set size actions will not run. Which is what it's supposed to do. But again, if the player dies and the layout restarts, sometimes the fade/ set size actions will run. Sometimes 2 or 3 times in a row before it corrects itself and the ball stays on the Gold disk.

    I've tried adding 'solid' behavior to the Gold disk, but this pushes the ball off of itself. 'Platform' doesn't work. I haven't tried 'pinning' the ball to the Gold disk, yet.

    There are very few different events in the game. Most of it has to do with moving the wooden disks. I've checked to make sure the ball events are not above or below other events/actions that may make it wonky, but it all seems fine.

    If anyone has some things for me to try or some info, greatly appreciated.