Floor Traps

Does anyone know how to impliment a floor spike system like this? I dont wanna have to go through every trap with matinees to move cause there wil be ALOT of them.

so your looking for a system where when your near the spikes they go down? thats not too hard you would just need a collision volume next to the spikes and when the character enters the volume you have a script that lowers them. to see an example look at the picture below. note that to be more in line with the video i added a slight delay to the spikes movement and for fun i added a was to damage the player if they hit the spikes. also i did this in a 3d sense but im sure the basic idea would apply for the 2d / iso look in that game.

I tried this and the spikes move to point 0,0,0 on the map when they go down :frowning:

are you sure your setting relative location? and is your spikes the root or do you have the default scene root as in the picture?

the way the script is setup the spikes would move from their starting location to a location in the same x and y position but 100 units lower. the actor itself should move just the spikes component.

Yea I tried world location and relaive with no luck.
Plus the rotation sequence of the spikes should happen be pre set so the player just follows them without influencing the spikes

you want to be using relative location not world (it makes things much easier). show us your script so we can see what you did so i can better help you fix it.

as for the other part of your comment it seems like you mean theres a set pattern to the spikes in which case you need to script when they move. theres many ways to do this but im sure someone else out there would have a better idea than I (the solutions i think up for it arent very elegant)

yea its a nightmare tryin to work this out lol

Take a look at this thread, maybe it can help you. https://answers.unrealengine.com/questions/822897/spike-trap-spikes-going-down-faster-each-time-the.html

If you can afford 1 timeline per object, then ThompsonN13’s solution is pretty much spot on.

@kmaster30:
A potential solution regarding moving multiple objects with different speeds with a single Timeline. If they’re objects they can have their own speed variable. If they’re just components, you can use a Component|Float Map to assign their speed.

Another example

Hmm thanks guys, I’ll look these options up and see what i can come up with :slight_smile:

Also create a spike trap blueprint so you only have to program it once and can place many of them and they all work the same way no matter what changes you make to the bueprint