How do I make Pressure Plate Spikes?

0 favourites
  • 14 posts
From the Asset Store
Ready to use construct 3 game template and release to mobile divice.
  • 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.

  • 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?

  • 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.

  • 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.

  • 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.

  • 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.

  • Please can you lay it out for me? Where should I put the For Each events? Sorry about this.

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

    But I digress, here's how I use it to deal with cutting grass objects:

  • 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. ^-^

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Giving someone an idea on how to fix something over a straight up solution they can copy/paste can teach them more.. At least that's what helps for me, so I pass ideas on the same way. Hardly anything to do with being elitist.

    (But if we're being honest, with your post's content screaming "I'm too lazy, make this for me so I can copy it" I must admit I am much less inclined to take the effort in the first place. Whether you intended it to sound as such or not.)

    ---- EDIT -----

    I see you responded again, it'd really really help if you provided a file for us to tinker with here.

    Anyhow, your third condition isn't really necessary, as the wait 2 seconds could be under the event where it's not overlapping as well. You should probably also remove Trigger Once.

  • Before I reply, I've already told you I cannot post a file, drop it already.

    If you read my post properly, that's not what I meant at all. I had been working on this for the past few hours and I just couldn't understand what I was doing wrong. I had completely forgotten about the "For Each" feature.

    I did as you advised and it now works great, thank you very much. I appreciate it.

    I wish the people on this forum would simply comply and help out one another, rather than acting like they're the top of the world. It'd be easier for everyone if people tried to understand how the question-asker is feeling, and what they're trying to say.

    Being condescending and automatically assuming stuff is no way to help someone with a problem, especially when they're new, just saying.

    Thanks a lot for your help again, I hope you treat others with a little more respect in the future

  • As soon as you speak of wanting an example *.capx for download and upload images to show stuff I really don't think your internet's too poor to give us an example.. But instead of going on about that over and over.. It's not important right now.

    Anyway, if you took offense to what I said then I apologise. Years of spending time on various ''help'' forums has made me see all sorts of people, from the folks that just want others to basically create their entire game for them to people that just need help with that tiny little speck they keep glancing over. I try to stick in the middle with my responses, although sometimes my lack of tact and knowledge of the English language makes things come out a lot less pleasant than intended.

    Anyhow, glad it solved your problem. That's the main thing that matters here.

  • Upload and Download speeds are entirely different, and uploading pictures takes nothing at all. Living in NZ, my internet is complete crap :/

    Thanks again, have a great day.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)