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.
A question( that has soething to do with switches I think)

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 87
How would I make it so that the player can only go down the stairs to the next room if all of the monsters are defeated? I need it so that if all of them are dea, then the player can go to the next room, but, if not, then the message PLAYER: I need to defeat all of the monsters first. is shown. How do I do this?

*
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
I'd use a variable. After you kill each monster, add 1 to the variable, and then you can make it so that the teleport event is conditioned on that variable being above a certain number.

**
Rep:
Level 87
That si another problem: I don't know how to use variables and switches and self-switches. Could you clear that up for me?

***
Rep:
Level 88
The mind is the best weapon.
(editing...i messed this up while writing)

Make all of your monsters have a control switch after being defeated.

Ex:

Spoiler for:
Battle Processing: Enemy1
Control Switches: [0001: Enemy1] = ON
Erase event

Do that for every enemy.

Now for the door. First, the message. Make a text under "Insert" and type in whatever you want your character to say, such as "To open the door, I have to kill all of the monsters first." Now click on "New Event Page" at the top and click on "2". Change the graphic in "2" as an open door (or no door at all, whatever the case might be to make it look better.) Click on Insert under the textbox (the white box) and click on "Conditional Branch". Then "Control Switches...". ONLY change the tab "Single" under "Switch". Change it to whichever event was used for your enemy (Enemy1, for ex.)For every monster there is, add a control switch after that.

Ex:
Spoiler for:
Control Switches: [0001: Enemy1] = ON
Control Switches: [0001: Enemy2] = ON

Hope this helps. :) If you need any explaining, just ask.
« Last Edit: April 08, 2007, 11:03:27 PM by BackSeatBandit »
->

*
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
So... many... switches...

Seriously, variables are the way to go here. One variable can account for however many enemies you want. Here are two tuts on variables. It helps to know switches, but it's not necessary. If you really want to know, then find a post by Zeriab and follow his signature.

http://rmrk.net/index.php/topic,11826.0.html
http://rmrk.net/index.php/topic,14157.0.html

In a nutshell, variables, in your case, can be used as a counter. It counts the number of enemies you defeat by adding 1 each time you defeat an enemy with the Control Variables command. Then, you can set a condition on an event to run only if that variable has reached a certain number. This is not the only use for variables. Read the tutorials.