Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
Sign in to follow this  
ChaosDesigned

Multiple Conditional Switch Help

Question

I'm trying to set up an event where monsters attack a town. There are going to be lets say 8 or so monsters and the player must defeat all of them before being able to progress. How do I set up a script that will only allow the character to leave the area once all of the conditions have been met. (The conditions being all the monsters are dead.) While still allowing the player to kill them in any order they choose.

 

I tried setting a conditional branch but you can only select it to check for one switch being on at a time.

 

I don't even know what variables are I haven't found something that explained them well enough for me to try to even see if that would solve this problem. So.. can anyone tell me the best or easiest way to have this occur?

 

Ps. I ask A lot of questions. I hope I'm not getting annoying.

Share this post


Link to post
Share on other sites

19 answers to this question

Recommended Posts

  • 0

I'm trying to set up an event where monsters attack a town. There are going to be lets say 8 or so monsters and the player must defeat all of them before being able to progress. How do I set up a script that will only allow the character to leave the area once all of the conditions have been met. (The conditions being all the monsters are dead.) While still allowing the player to kill them in any order they choose.

 

I tried setting a conditional branch but you can only select it to check for one switch being on at a time.

 

I don't even know what variables are I haven't found something that explained them well enough for me to try to even see if that would solve this problem. So.. can anyone tell me the best or easiest way to have this occur?

 

Ps. I ask A lot of questions. I hope I'm not getting annoying.

 

 

I think you don't need a script, you can use events instead ( it's easier). Give me some time, to work on a demo

Share this post


Link to post
Share on other sites
  • 0

I think you don't need a script, you can use events instead ( it's easier). Give me some time, to work on a demo

 

I meant script as in Event Chain. Using Switches and all that crazy stuff. I just call it all "Scripting" Cause that's all it is. I didn't mean something external or imported scripts. I just don't know the proper steps to getting this done using events and switches or variables and stuff.

Share this post


Link to post
Share on other sites
  • 0

I meant script as in Event Chain. Using Switches and all that crazy stuff. I just call it all "Scripting" Cause that's all it is. I didn't mean something external or imported scripts. I just don't know the proper steps to getting this done using events and switches or variables and stuff.

 

Ok i´ve finish it. i didn't have time to put a tutorial, but all you need to do is see the ghost events and the passage event. If you want i can make one, but it will take more time.

 

http://www.mediafire.com/?knnkgmd3ymm

 

 

Basicly what've done is, in the ghost event, i've putted a switch, let's call it "beat monster 1"

In this demo, there is a total of 4 monster, and each one has their own switch (beat monster 1, beat monster2, beat monster 3 and beat monster 4).

 

Now if you see the other event ( the one that leads to the other area), you can see that've putted a conditional switch.

 

So what i did was: "Conditional Branch"/" 0001 - beat monster 1 switch on".

Then below the " Conditional branch: Switch [0001: beat monter 1], and above "Else" repeat the process, but this time instead of putting the "beat monster 1", put "beat monster 2", and so on.

 

You can also put if you want, put a command in the "else".

In this case, i've put a text saying, you have to kill the monster first, but that up to you. :)

 

PS: ignore the mapping, i suck at it :)

I also put 4 ghost instead of 8, i was in a hurry.

Share this post


Link to post
Share on other sites
  • 0

Ok i´ve finish it. i didn't have time to put a tutorial, but all you need to do is see the ghost events and the passage event. If you want i can make one, but it will take more time.

 

http://www.mediafire.com/?knnkgmd3ymm

 

 

Basicly what've done is, in the ghost event, i've putted , let's call it "beat monster 1"

In this demo, there is a total of 4 monster, and each one has their own switch (beat monster 1, beat monster2, beat monster 3 and beat monster 4).

 

Now if you see the other event ( the one that leads to the other area), you can see that've putted a conditional switch.

 

So what i did was: "Conditional Branch"/" 0001 - beat monster 1 switch on".

Then below the " Conditional branch: Switch [0001: beat monter 1], and above "Else" repeat the process, but this time instead of putting the "beat monster 1", put "beat monster 2", and so on.

 

You can also put if you want, put a command in the "else".

In this case, i've put a text saying, you have to kill the monster first, but that up to you. :)

 

PS: ignore the mapping, i suck at it :)

I also put 4 ghost instead of 8, i was in a hurry.

 

 

The map doesn't even look that bad at all. Looks rather nice. Lololololol.

 

So what I do is put choose the

Conditional Branch if Beat Monster 1 is ON

(If it is on, I put another conditional branch for beat monster 2?)

>Conditional Branch if Beat Monster 2 is ON

>Else.

Else

 

 

So it's Make a Conditional Branch, put another inside that one, and another inside, and another inside, etc rite?

 

And thanks!

Share this post


Link to post
Share on other sites
  • 0

The map doesn't even look that bad at all. Looks rather nice. Lololololol.

 

So what I do is put choose the

Conditional Branch if Beat Monster 1 is ON

(If it is on, I put another conditional branch for beat monster 2?)

>Conditional Branch if Beat Monster 2 is ON

>Else.

Else

 

 

So it's Make a Conditional Branch, put another inside that one, and another inside, and another inside, etc rite?

 

And thanks!

 

 

Yep that's it! very easy right? ;)

If you need anything else, just say.

Share this post


Link to post
Share on other sites
  • 0

Yep that's it! very easy right? ;)

If you need anything else, just say.

 

 

Awesome! Thanks a ton! There is another thing but I'm not sure what's wrong with it before I can ask how to fix it. Give me a day or two.

Share this post


Link to post
Share on other sites
  • 0

Another way you could have achieved this is using 2 game variables, and a script call code using a for statement.

 

Each time an enemy is defeated, add 1 to the variable. Then, use a for statement that will add 1 to the other game variable. When game variable 1 equals game variable 2, condition is met.

Share this post


Link to post
Share on other sites
  • 0

It would defiantly be better to add 1 to a variable everytime a monster is killed, and once that variable is equal to 8, the player may progress. (Leon: why did you mention two variables, or even scripting?)

 

A variable is basically a box, not a value. You can put values... or cookies, into the box. Later, you can take away cookies, add cookies, and check to see how many cookies there are.

 

You can change what's in your box with a control variable event command.

Share this post


Link to post
Share on other sites
  • 0

with 2 variables, you can do this with multiple places, multiple times, set up variables, random instances where the total is more or less, and it is easier to track.

Share this post


Link to post
Share on other sites
  • 0

By the way, I agree with Leon. One variable is here needed only. Each of monsters adds or reduces a number with a variable, and as soon as a number becomes necessary, handing over is activated quest end by a new page.

 

Like: If Win (Monster 1): Variable 001: +1

If Win (Monster 2): Variable 001: +1

...

 

Quest End: New page

Activation Rules: Variable 001 = 8

Share this post


Link to post
Share on other sites
  • 0

By the way, I agree with Leon. One variable is here needed only. Each of monsters adds or reduces a number with a variable, and as soon as a number becomes necessary, handing over is activated quest end by a new page.

 

Like: If Win (Monster 1): Variable 001: +1

If Win (Monster 2): Variable 001: +1

...

 

Quest End: New page

Activation Rules: Variable 001 = 8

 

 

OOOOOOOOOOOOOOOOOOOOOO!!!!!!! Okay Okay! That makes SOOOO MUCH Sense the way you explained it, The Cookies idea help me get a grasp of what you were talking about but putting it like this makes PERFECT sense. That's awesome, I didn't know what's what variables were. This will make scripting similar events like this much much easier. Thanks SOOO Much. Everyone.

Share this post


Link to post
Share on other sites
  • 0

Here's another question. Do I have to make a Switch for Every Treasure Chest I put in the game? How do I keep the chest from being lootable every time the person leaves the room? Or do I have to make it so that as long as the chest ON switch is on it cannot be re opened?

Share this post


Link to post
Share on other sites
  • 0

Wow. Mass confusion. Agckuu, I'm the one that suggested 1 variable, not Leon.

 

Chaos, I made the cookie explanation, and you quoted Agckuu. And please use the edit button instead of double posting.

 

As for the latest question, of course not! Only use switches for things you want to be controllable from other events. For treasure chests, just use a self-switch. Self switches are essentially the same as switches, except you can have as many as you want in your game (only 4 per event though), and they can only be turned on or off from the event that they are in. They are basically "Event Switches" where normal switches are "Map Switches". :)

 

Does that make sense?

 

Also, you seem to saying "Sorry I ask to many questions" a lot. Well I LOVE answering RMXP questions, so keep em' coming.

Share this post


Link to post
Share on other sites
  • 0

Wow. Mass confusion. Agckuu, I'm the one that suggested 1 variable, not Leon.

 

Chaos, I made the cookie explanation, and you quoted Agckuu. And please use the edit button instead of double posting.

 

As for the latest question, of course not! Only use switches for things you want to be controllable from other events. For treasure chests, just use a self-switch. Self switches are essentially the same as switches, except you can have as many as you want in your game (only 4 per event though), and they can only be turned on or off from the event that they are in. They are basically "Event Switches" where normal switches are "Map Switches". :)

 

Does that make sense?

 

Also, you seem to saying "Sorry I ask to many questions" a lot. Well I LOVE answering RMXP questions, so keep em' coming.

 

 

Oh. I didn't know that Self Switches didn't reset after you left the map. This helps a lot! I'm sorry, I just keep feeling as if I'm the only one asking questions. Lololol.

Share this post


Link to post
Share on other sites
  • 0

Well it's simple.

Establish in each event of chest new page with the necessary condition for activation of self-switch.

There already prescribe the event after the opening of the chest. That's all.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...