AllanR's Forum Posts

  • lol, I came back to post my version and saw you beat me to it! :)

    amazing similarities... I even chose the same file name! I did it with just on one layout - and used functions to call the transition whenever needed, and used a global variable to trigger the completion of the transition (so you know when it is safe to change the scene or call another layout...

    I like the way you used a global layer.

    https://www.rieperts.com/games/forum/DiamondTransition.c3p

  • I have seen a lot of questions about making trails recently, so I thought I would see what I could come up with...

    I tried two different ways - the first way (the "fake" way) was to use a single sprite that uses gradient to fade the trail out. It works well, and has no performance trouble. But it can't change shape - so it wont follow an object randomly around the screen. I have two balls moving around a circle and the trails follow the balls around the circle, but that is all they can do.

    The other approach is to use a lot of objects to build a trail and have them fade out and shrink down in size as they fade. This allows for a real trail that can follow an object. You can control how fast the trail fades out, how closely positioned the objects are to make the trail look solid, etc...

    https://www.rieperts.com/games/forum/Trails.capx

  • that is because buttons stay focused after a click, and intercept keyboard entry.

    that the end of the Button On Clicked events, add a Button Set Unfocused action.

  • take a look at the Space Blaster example under Intermediate Examples, it shows one way to do waves of enemies using a spawner with instance variables that tell what type and how many to create.

  • or put the values in a string with a delimiter and use TokenAt

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • very impressive!

  • there are a great many ways you could accomplish this...

    here is one way I have done similar things - use a "detector" sprite to check for overlapping squares, to see which ones are adjacent and then check or set their state...

    in this sample I briefly show the detector sprite so you can see which squares it is over (normally it would stay invisible).

    https://www.rieperts.com/games/forum/TileGame.c3p

  • nicely done! that was a lot more challenging than I was expecting :)

    who knew that cookies give unicorns so much flatulence...

  • brunopalermo

    Ashley just closed my bug report and said they are not going to change it back to how it was working prior to R167. So, you can no longer count on new objects being pickable after a function call - they will not available until after the next top level event.

  • one more thing I will add is that if you pin everything to the same base object (panel), you don't have to calculate an offset from the panel for each sub item getting pinned.

    set the button to where you want on the panel and pin the button to the panel,

    then position the text to the button, but pin it to the panel instead of the button.

    you position everything just as you have been - you just have to be sure you have the correct panel picked if there is more than one.

  • if multiple limiting tiles are visible, how is the camera supposed to know which ones apply? and which direction to limit the camera?

    can you post a sample file so we can see how you are placing the tiles?

  • this is what I would do...

    create Min and Max sprites for X and Y, and clamp the camera coordinates to their locations.

    https://www.rieperts.com/games/forum/LimitCamera.capx

    this puts the limit markers where to stop the camera... you can still see beyond that so you have to calculate where to put them. if you dont want to see anything beyond the edge of the layout, you have to put these far enough in to accomplish that.

    it you want to set these at the limit of what you see, then you have to calculate an offset from them based on the viewport size.

  • when the character collides with the green Sprite, add another condition (or sub-event) to pick the Entity Nearest Sprite.X, Sprite.Y

    Character - on collision with Sprite
    Entity - Pick Nearest (Sprite.X, Sprite.Y) -> Entity Destroy
    
  • I gave it a try... the only way I could do it with no flicker was to have the Fade sprite visible and covering the screen at the start of the layout. So, I put it in its own layer, and made the layer hidden so it doesn't cause trouble editing other things on the layout.

    I added Fade to the sprite twice - once called FadeIn and once called FadeOut. That way I could have everything preset - just not enabled.

    at the start of layout I enable FadeOut, so the screen goes from Black to visible. We get a trigger when that is done, so we know the game (or menu) is ready to go.

    when it is time to leave the layout, I start FadeIn to go from visible to Black. That gets its own trigger, so we know when to call the next layout.

    I didn't use a function or any global variables - just the triggers.

    https://www.rieperts.com/games/forum/FadeInOut.c3p

  • You do not have permission to view this post