I was trying to make a falling enemy similar to the ice spikes in super Mario maker. How can I make a spike that falls when the player is under it? Thx!
One way of doing it, but there are several:
Place your spike, and add an event:
condition: the X position of player is more than (X position of spike minus 50 pixels),
action: apply a force to spike at 90° angle.
Or just x position. .
Got the job done awesome thx!
This works but is there a way to activate only the one spike thats above the player? I tried it with multiple spikes, and all of them fell when the player was under them.
Sure, youâll need to put your events inside a for each event. Youâll find it in the big plus in the top right icons.
another option would be give the spike a platformer behavior, set speed to 0, and make an invisible platform under it that doesnât apply to the player. Then: condition: object âplayerâ is in collision with âinvisible_platformâ action: delete âinvisible_platformâ
Can you explain how to achieve this?
player is in collision with platform - disable behavior âplatformer characterâ of player.
then make it so the action inverts when the player is not in collision with the platform.
That wonât work. As I understand it, the platformer character movement, collision and separation from the platform is done before the events are processed. So the collision will never be detected.