You can try a Conditional Branch or use two separate event pages. Both are quite useful to learn.
For the former, you can set a check if the spikes graphic is turned down or up and have the player react depending on their position. For the latter, set one page with spikes up and one page with them down. Set a condition switch on the second page, and code different reactions on each page. When you want spikes to toggle up or down, just turn on/off the switch.