how to Alerting rocks to fall down?

Can anyone help me to have an events that can alert rocks to fall down when the player is in the position you give… :astonished:

Hi Oscar Erni,

I’m a newish user myself. Hope this works for you. If you want for example for the rocks to be triggered at 100 of X position. You will want to make it greater than or equal to 100 on X position

On condition - All Objects - Position - Compare X position of an object (eg. >= 100 of object[player])
action - (Trigger falling rocks)

:smiley: thank you very much …
the rocks doesn’t fall down… how do I apply gravity on rocks to fall down…something like this… if the player is approaching on designated position, the rocks will suddenly fall down ( be alerted and the rocks will fall down…)

Hi Oscar Erni,

I have not really tried out using behaviours so i could be wrong. But i think you can add gravity to the rocks by:

Right clicking on the rocks (possibly have to be in the scene) - add a behaviour to an object - physics engine

Next select the rock and in the properties panel (where the position, scale, z-order are shown). There is now a physics property at the bottom. Click on “Click to edit” There should be options to change the gravity.

I haven’t played around with this, so you will need to do some trial and error.

thank you very much… :smiley:

As AnimatedG said, you could use the Physics behavior this way:
*Add the physics behavior to the rocks, edit the behavior and put a positive value on the gravity Y coordinate.
*In the events editor, add “At the beginning of the scene >> Activate Physics for Rock: no” so the rocks won’t fall at the beginning.
*Now, when you reach a position to alert a rock (X position of player > some value, player colliding with alerting area, etc.) activate the physics behavior for the specified rock and you are done.

If you don’t want to add the Physics behavior for such simple thing, you can also do it:
*In a first event, at the beginning of the scene, set a variable “active” for the rocks = 0 (this is an object variable, now each rock has its own “active” variable set to 0).
*In another event, when you reach a position to alert a rock, set the variable “active” of that rock = 1, that specific rock is now active.
*Finally, in a third event, if the variable “active” of rock is = 1 move it downguard (modifying the Y position or through forces), so active rocks will fall down.

Thank you very much…
another one… :smiley: :smiley:
when the rocks fall down how do i do an event it will delete the rocks besides collision on bottom platform…

view the attachment :smiley:


Capture.PNG

Hi Oscar Erni,

Maybe you can try deleting past a certain Y position.

Eg, the floor Y position is 100

Delete rocks when past Y Position of 100. This will only work if all your stages have flat terrain

Alternatively, if the floor is an object itself, you can do
Delete rock - When rock.Y() > floor.Y()

Alternatively, if your floor is not an object. You can create a rectangluar block. Place the block on top of the floor and hide the block. Then when rock collides with block, delete rock

thank you very much…great men. :smiley:

You might be able to simplify your events a bit if the rock is just falling straight down, by combining events 17 and 18 into one:

rocksdebris distance to tori is below 70 pixels   |   Apply to rocksdebris a force of 0 p/s on X axis and 100 p/s on Y axis

This event would automatically work for any other rocksdebris objects you add to the scene, without you having to enter a new position to apply the force towards.

Nice men… :smiley: :mrgreen: