RMRK is retiring.
Server is paid up for the rest of 2026, but the forum may go after that. See here for more information. Please archive or save anything you would like to keep before 2027.
Main Menu
  • Welcome to The RPG Maker Resource Kit.

Make event occur if all enemies are dead?

Started by mitoz, January 07, 2010, 01:56:57 AM

0 Members and 1 Guest are viewing this topic.

mitoz

I am having a little problem figuring something out. I am currently using the Mr. Mo abs and i want to make it so that a event occurs once i kill all of the monsters on the map. How would i proceed in doing something like this? I tried searching around various forums but i can not figure it out.

I would appreciate any help that you can possibly give me. 



Grafikal

Well, if I remember correctly, this is directly related to the events noted as 'enemies' on the map and so you would have to find where in the script it says to add a number to a variable. Generally you do this within the event of the enemy upon death on map. I don't know anything about Mr.Mo abs so I couldn't tell you and for that reason, I'm moving this to script support.

mitoz

Thanks for moving the thread bud.

I have tried messing around with the variables before i posted here but i couldn't get it working after like an hour of working on it. I am not the best when it comes down to variables though. :-\

mitoz


DarkGamer

Search for some variable threads, i bet there are a lot there...

Variables work with Conditional Branch...

You set variables for something, i will give an example... A dice rolling example...

Ok, when you roll a dice it can be 1,2,3,4,5 or 6...

Ok, lets start:

"A simple dice gambling system that is coming from my head atm xD"

Rolling the dice:

"you add a npc to make the dice game start, to activate the switch rolling dice, and start the game."

if Switch Rolling dice On
Show choices:
Want to roll the dice?
Yes
variable (dice) rating 1~6
switch dice event on
else
nothing

Set (dice) variable = 0


Conditional Branch:
If switch dice event on
If variable (dice)= 1
"here you could show a picture witha number 1 on the dice"
Show picture (dice 1)
else
Conditional Branch:
If switch dice event on
If variable (dice)=2
show picture (dice2)
So on with the other 4 numbers.


Now to add something to happen when the value is 1...

in another paralell process

Conditional Branch
if variable (dice)=1
erase picture (dice 1)
show message: That roll sucked, try again...
Set variable (dice)=0
switch dice event off
Switch Rolling dice On
else
Conditional Branch
if variable (dice)=6
erase picture (dice 6)
show message: You just won, take this as a reward.
add item: 1000G
Set variable (dice)=0
switch dice event off
Switch Rolling dice On
else
Conditional Branch
if variable (dice)=3
erase picture (dice 3)
show message: Too bad, that's an unlucky number.
remove item: 500G
Set variable (dice)=0
switch dice event off
Switch Rolling dice On


This is a simple dice gambling system that i think is easy to teach you how it does work...
This was what came to my mind atm, so, hope you can understand and start using variables in a ton of diff ways.

Gl
My Puzzle/StandAlone game in a week:
[spoiler]Link to topic: http://rmrk.net/index.php/topic,34230.0.html
Link to Download: http://www.megaupload.com/?d=CH8FFWIE[/spoiler]