Here's how I do it.
collision with player event:
if idd=1{
with(playerKiller){if idd=1{vspeed=4}};
}
if idd=2{
with(playerKiller){if idd=2{hspeed=-1};if idd=3{hspeed=-3};}
}
instance_destroy();
...that's it! This way, all of the triggers you might have are the same object. You just have to assign them idd's, along with the spikes you want to move. Like this:
Now I'll explain what I did there. I gave that trigger an idd of 1, via the creation code method shown in the picture above.
I ALSO gave the spikes above an idd of 1, but it DOESN'T have to be the same number as the trigger that makes them move!
The code above states, if the TRIGGERS idd is 1, then the "playerKillers" (spikes) with an idd of 1 will have a vspeed of 4 when the trigger its touched by the kid. Here it is in action:
https://gyazo.com/bc3706b5ac9f7bdee01a039c02bc8be4You see, I gave all 4 of those spikes the idd of 1, and when I hit the trigger with the idd of 1, they went down! Now, I did the same thing with the next bit of code there, except it's a TINY bit more complicated, but not really. It triggers two spikes in two different ways! It gives them two different speeds. I gave one an hspeed of -1, and the other an hspeed of -3, with the same trigger. They have different idds, but the trigger still activates both of them. It makes the spike with an idd of 2 (the top spike) move at a slower speed than the spike with an idd of 3 (the bottom spike.) Oh, and the next trigger has the idd of 2, so it can actually activate them! Here's how it looks:
https://gyazo.com/2e539e00b36d4770c6a93ea087d5819cOh, and I destroy the instance so it can't do the actions more than once.
You can add anything you'd like to it, this is how I do it. Provides a lot of leniency!
...now that may seem complicated, but it really isn't, most of that was just me explaining how it worked, haha!