RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[Request] Trap Event System [Resolved]

0 Members and 1 Guest are viewing this topic.

*****
Rep:
Level 88
Here's a short description of what the event should do.

If player touches trap, player gets stuck in trap. Every second player suffers x amount of damage. (Damage depends on trap) Player must press a button (ie, ENTER) x amount of times to free self from trap. (Amount of times again, depends on trap) Once free, player gets pushed one or two squares away from the trap.

I also want there to be a sort of "caught in trap" animation during time of being trapped, but I know that could just be a change sprite of player to none, then whatever animation set to the trap's event.

I understand most of this, but I'm not very good with variables/timers. (Those would have something to do with it right?) :-X I'm just wondering if someone can help me understand and make this system. I have a new idea for a sort of puzzle game, and this is a major part of it.

I'm not asking anyone to make it for me, even though that would be awesome, but if someone could just get me on the right track, I'd really appreciate it.

Thanks.
« Last Edit: October 11, 2008, 04:15:30 PM by Revo »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Well, here's what I would suggest.

The trap is on player touch.

Two common events. One is set to parallel process on Switch XXX, the other is Call.

In the trap, do this:

Control Variable: Variable WWW = <amount of damage done per second
Control Variable: Variable YYY = <amount of times player should press enter>
Control Switch: Switch XXX is ON
Call Common Event - ZZZ (the one on Call)


In the parallel process common event do this:

Damage - all party members  - Variable [WWW]
Move Route: Player
    Wait 20 Frames
Wait 20 Frames


In the call event do this:

Loop
Conditional Branch: Button C is being pressed
Branch END
Conditional Branch: Variable[YYY] == 0
  Switch: [XXX] = OFF
  Set Move Route: Player
     Step Backward
  Break Loop
Wait: 1 frame
END Loop



Anyway, that should work. I might have missed something though.

*****
Rep:
Level 88
Thanks, MA. I think that will work just fine for what I want. I guess this is resolved then. ;D