Actually, I have a simpler way of doing this. It uses no Varibles and only one Switch. You can also copy and paste this as many times as you like, therefore if you need many of this traps, you don't need extra Variables to account for where and when the player is on the trap.
I'm using a Spike Trap for the example. First make an Event, name it Spike Trap. Next set Move Route (Or Pattern) to Custom. When editing the Move Route, in the Define Route window, have a wait command for how long as you want it. Lets say 40 Frames. Next have a switch turn on, say Switch: Spikes (All the Switches, being turned on or Off are done within the Move Route Commands) Set it to repeat. Press Ok, you're done with the move route command. You'll need to change the Frequency to Highest. Now you need to make the Evet a passive Event, or at least on the First Page. Next Set it to Parrallel Proccess. Alright, TO THE NEXT PAGE! On the Second page, Change the Graphic to the Spikes being fully up (if you want the Spikes to slowly raise, and then slowly go down, see the spoiler). We're going to do basicly the very same thing as before, but add some things. First of all, the preconditions of the Second Page, have to be the Spike Switch On. The next thing you'll do is set it to Custom and Set the Move Route, like before. Clcik Define Route and put a wait command for 40 seconds and then turn the Spike Switch off. Make it Repeating and then click OK. You'll need to change the Frequency to Highest, like before. The very last thing you need to do is set the Trigger to Hero Touch. You are now done and a proud owner of a trap, which is far easyer than before.
That should be everything. I hope it helped and was simple!