Switch mechanic and pike animation

Hello, guys! I'm new to RPG Maker so pardon me if my question is too newbie. I've been trying to create a boulder/switch/spike mechanism where you put the boulder on top of the switch and it lowers some spikes. The problem is: I want to make an animation of spikes lowering, so they don't just appear when the switch is activated. I've managed to do that, but I wanted that the spikes would rise back up when I removed the boulder, and simply can' think of a way to do that.

I'm adding a screenshot so you can see what I've done.
what is on page 1?

also, if you want to raise it back UP again, you need the oppesite as well.

in addition, you need to check X, Y evenf of the builder and the eventID
of the switch.

if switch and builder are equal as XY you lower it, if it's NOT than raise it.
Hello, guys! I'm new to RPG Maker so pardon me if my question is too newbie. I've been trying to create a boulder/switch/spike mechanism where you put the boulder on top of the switch and it lowers some spikes. The problem is: I want to make an animation of spikes lowering, so they don't just appear when the switch is activated. I've managed to do that, but I wanted that the spikes would rise back up when I removed the boulder, and simply can' think of a way to do that.

I'm adding a screenshot so you can see what I've done.

Like this?


Setup:
Spoiler: Spikes
1650220203027.png

1650220216194.png
Spoiler: Switch
1650220169720.png

1650221103146.png
Spoiler: Boulder
1650221035606.png

Of course all of that could have been even more simplified if I used script or plugins but I wanted to show how it was done without script/plugins. 🙂
Also as a rule I avoid parallel processing whenever possible, since too many parallel processes can surely cause lag and use more system processing/memory so there is no parallel process used in that. I simply put all the necessary steps into the boulder event (since the boulder is what will be triggering everything)
nicely done CT_Bolt to illustrate what I propose 😛 I had a different
way in mind, but there are a couple of methodes, but yours seems
nicely done as well =)
I would suggest using Autonomous Moveroute of the Eventpages to shorten the Solution a little bit.

1st Eventpage Graphic Spikes are UP and the Moveroute lowers them DOWN.
2nd Eventpage Graphic Spikes are DOWN and the Moveroute brings them UP.

Edit: Because else @ct_bolt solution would cause a display Bug when leaving and reentering the Map by showing the wrong Spike position while the correct Eventpage is active.
Edit: I missread
Alright added a couple extras to my previous method to cover a few extra things like map transfers and having the player step on the switch 😉

Now plays like this:


Setup:
Spoiler: Map
1650244304386.png
Spoiler: Spikes
1650243359851.png

1650243374251.png
Spoiler: Switch
1650243394841.png

1650243407579.png


This page is to check if the player is still on the switch:
1650243581651.png
Spoiler: Boulder
1650243659984.png

Added an extra autorun event to check if the boulder was on the switch when player left the map, and if so when re-entering a map place the boulder back on the switch. This does two things... keeps the boulder where it was left and makes sure graphics are correct when transferring between the maps 😉
Spoiler: Move Boulder if Switch is On
1650243834368.png

Transfer events are just normal transfer events.. nothing extra needed there 🙂
what is on page 1?

also, if you want to raise it back UP again, you need the oppesite as well.

in addition, you need to check X, Y evenf of the builder and the eventID
of the switch.

if switch and builder are equal as XY you lower it, if it's NOT than raise it.
Page 1 was basically just the spike sprite.

Alright added a couple extras to my previous method to cover a few extra things like map transfers and having the player step on the switch 😉

Now plays like this:


Setup:
Spoiler: Map
Spoiler: Switch
View attachment 223498
View attachment 223499

This page is to check if the player is still on the switch:
View attachment 223501
Spoiler: Boulder

Added an extra autorun event to check if the boulder was on the switch when player left the map, and if so when re-entering a map place the boulder back on the switch. This does two things... keeps the boulder where it was left and makes sure graphics are correct when transferring between the maps 😉
Spoiler: Move Boulder if Switch is On

Transfer events are just normal transfer events.. nothing extra needed there 🙂

This seems like a waay easier and clever way to do this boulder/switch thing! Thanks ctbolt!

I'll also try Bex's sugestion. Thanks!
This seems like a waay easier and clever way to do this boulder/switch thing! Thanks ctbolt!
Very welcome, glad to help out ☺️
Happy Game Making! :LZSgrin:

Original thread: https://forums.rpgmakerweb.com/threads/switch-mechanic-and-pike-animation.146842/