calminthenight's Forum Posts

  • You do not have permission to view this post

  • Here is a link to a thread where a user had a similar issue I believe. construct.net/en/forum/construct-3/how-do-i-8/why-not-enemies-attacking-155835

    While it's not the same thing you are trying to do, if you have a look at my project file in that link i think it could help you.

  • Your project doesn't work properly for me sorry. Most of the time the pawns spawn to the left of screen and fall continuously and when they do spawn correctly there is no AIFOV visible.

    Also your events in the file are different to those in the pictures.

    I can see that in event 60 you have for each pawn followed by pick all pawn which seems to be incorrect.

    Can you explain more clearly what the the issue is and what you are trying to achieve?

  • You do not have permission to view this post

  • Have a look at the modified version of your file. 1drv.ms/u/s!AkmrWgxeuxlKhIcr596sbSuJg3Rawg

    I've set it up so that the small has instance boolean variables that indicate if it is overlapping to the right, below, and below&right. Then I've put the test for the overlaps into a function that is called when the sprite has arrived at its moveto location.

    You only ever need to check for the offset at those three positions because if four squares are together that condition will always exist.

    You can change when the function is called to suit whatever your game is about

  • Forgive me if I misunderstood your question but to simplify your current method could you not just check for overlap on the player sprite at an X offset?

  • you could use a tilemap and check the tiles that surround another tile for other squares. If the right combination existed you could replace them with the new tiles for the bigger square or remove them and add an actual sprite at their position.

    If you didn't want to use tilemaps you could use the Bbox coordinates and check for similar, or you could use the is overlapping at offset.

  • Ah yes it may be, I can't remember when it was added. If you want to switch to the beta you'll have access. Elsewise you could ignore the hierarchy and add another event that picks the two objects and use every tick set childobjects Z-elevation to parentobjects Z-elevation.

  • I know it doesn't answer your same layer problem, but why is it necessary that they are on the same layer?

    You will need to create a layering system where sprites that are behind others are moved onto a lower layer. The demo in this thread, specifically the 'reveal' actions are what I think you are looking for.

    construct.net/en/forum/construct-3/how-do-i-8/set-invisible-part-sprite-144516

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • To post your project file you'll need to upload or save your project file to a cloud service like google drive etc. then create a shareable link and copy that link into a post in this thread.

  • Firstly can you clarify if you are looking to change the Z-elevation, or the Z index? As dop2000 said they are different things. If you are looking to create the particles at the rock coordinates, and there is only one rock, and then have the particles always be the same Z-elevation as the rock sprite, then you can use:

    On whatever condition then

    action -> Create object 'particles' Rock.x,Rock.y

    action -> Add child 'particles' to Rock (and make sure the Z-Elevation option is selected)

    action -> Set 'particles' Z-Elevation to Rock.Zelevation

    This will always match the particles Z-elevation to the rocks.

    If you only want to match the Z-elevation at time of creation and not have the particles z-elev transform to that of the rock later then you can uncheck the Z-elevation box when adding the child.

    If you have multiple rocks, you will need to use a pick condition that chooses the correct rock.

    demo here: 1drv.ms/u/s!AkmrWgxeuxlKhIcnLZBM7z8smX04dg

    If you're looking to move the particles to the same layer as the the parent then do what dop2000 suggested. Or if you know the layer that the rock is on then set it correctly in the create object action.

  • It does work exactly as you said it should. Make sure that when you add the particles to the parent you are not asking it to replicate the parent's Z-Elevation

  • I'd suggest there is an error somewhere else in your events causing the issue. I have just replicated your exact code and it works perfectly, although you have no redundancy for if both the player and box are overlapping the button, which will cause it to move twice. You could fix this by moving the door to var_doorYvalue+200 instead of self+200.

    Also check that you have collisions enabled on your box sprite

    Post your project file if not.

  • I would use variables for each slope like: Var_SlopeDirection, Var_SlopeInclineDecline

    Then use something like

    is ball overlapping slope

    & slope is direction X - set angle to ball.angle+1 or -1 (depending on slope direction)

    & slope is incline - set ball.movementspeed to ball.movementspeed-1

    Something along those lines to simulate the effect a slope would have on the ball