Main Menu

A question( that has soething to do with switches I think)

Started by clakes707, April 08, 2007, 10:12:59 PM

0 Members and 1 Guest are viewing this topic.

clakes707

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?

modern algebra

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.

clakes707

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

BackSeatBandit

#3
(editing...i messed this up while writing)

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

Ex:

[spoiler]Battle Processing: Enemy1
Control Switches: [0001: Enemy1] = ON
Erase event[/spoiler]

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]
Control Switches: [0001: Enemy1] = ON
Control Switches: [0001: Enemy2] = ON[/spoiler]

Hope this helps. :) If you need any explaining, just ask.
->

modern algebra

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.