How do I make Pressure Plate Spikes?

Get help using Construct 2

Post » Thu Feb 11, 2016 9:55 am

When you stand on the pressure plate, the plate will be pushed down. Once you get off the pressure plate, the plate will go back up, THIS TIME with spikes on it. The spikes will only last 2 seconds, and then it will revert back to the spikeless pressure plate.

I've been trying to do this for hours, I just can't figure it out, I need a bit of guidance.

I have three sprites. The default pressure plate, the pushed down pressure plate, and the spiked pressure plate. In that order, we'll call them "Default", "Down", and "Spiked".

When the player stands on the plate, and it's playing "Default", we'll change it's animation to "Down".

When the player is off the plate, and "Down" is playing, we'll change it's animation to "Spiked".

If the pressure plate is currently playing "Spiked", wait 2 seconds and then play "Default" again.

I'm not going to bother going into what problems I'm having, because there's too many to count. Please, please, please, if you can, create it from scratch and provide a Capx for me.. It's pretty simple, but I just can't seem to figure it out.

I would greatly appreciate it. (Please add comments if you can too). If you need to know, the spikes kill the player instantly. Thank you very much in advance.
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Thu Feb 11, 2016 10:16 am

Wouldn't it be easier if you provided a basic *.capx with what you tried (only with the bare minimum) and people can look at what you did, then offer you pointers on it?
B
5
Posts: 43
Reputation: 311

Post » Thu Feb 11, 2016 10:30 am

I've already given the details for what I've done so far, that's all there is to it. I can't seem to figure out why it isn't working smoothly. There's far too many problems, from scratch is far easier at this point.
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Thu Feb 11, 2016 10:35 am

The logic you mentioned seems OK.

Well, it's best for community people who want to help to have a basis on which to build on.
These are help forums, not "do for me" forums/services.

And a capx project is far better than any "explanation" as the capx don't forget any detail.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
276
S
103
G
84
Posts: 7,289
Reputation: 83,098

Post » Thu Feb 11, 2016 10:50 am

I'm telling you, it's literally what I said.

Player | Is overlapping PressureSpikes || Set animation to "Down"
-----
Player | X is overlapping PressureSpikes |
PressureSpikes | Is playing animation "Down" || Set animation to "Spiked"
----
PressureSpikes | Is plating animation "Spiked" |
System | Trigger Once || Wait 2 seconds, Set Animation to "Default"
----

I over complicated everything and fixed a few things. Now the only problem is, if I step on multiple plates one after another, they won't play the "Spiked" animation until the player is not touching any single one of the ones they just walked over.
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Thu Feb 11, 2016 11:36 am

I'm thinking part of your issue lays in addressing all the pressure plate objects at the same time, but I can't confirm this as I don't have anything to test it with. You could try and For Each through the PressureSpikes, which takes them all into a separate scope and lets them behave individually.
B
5
Posts: 43
Reputation: 311

Post » Thu Feb 11, 2016 11:42 am

Please can you lay it out for me? Where should I put the For Each events? Sorry about this.
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Thu Feb 11, 2016 11:48 am

If you had provided a *.capx file I would have looked at it, possibly corrected it and posted it back in the first place. :roll:

But I digress, here's how I use it to deal with cutting grass objects:
Image
B
5
Posts: 43
Reputation: 311

Post » Thu Feb 11, 2016 12:06 pm

Thanks for the help I suppose. I'll look into it.

Just for future reference, it's not impossible to help someone without being an elitist <3

I can't upload a capx because my internet sucks major dong, it's not my fault. ^-^
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Post » Thu Feb 11, 2016 12:24 pm

Image

For whatever reason, after going back to the Default animation, it can't repeat the cycle for another 2 seconds after that.

Stand on it > Plays "Down" > Plays "Spikes" after standing off it

After 2 seconds > Plays "Default"

Then if I stand on it immediately after that, it plays "Down", but it'll pop right back up if I stand off it, playing the default animation again.
B
24
S
10
G
1
Posts: 153
Reputation: 2,660

Next

Return to How do I....?

Who is online

Users browsing this forum: Jazz813, KIDofGOD and 2 guests