Well this is my second tut WEEEEE
Here I will try to teach you how to make an fire extinguisher.
By an request of DaleStrickland ;)
It might look like its alot but its okay.
First we want to make an fountain that will gain us the ability to get water.. not ?
Well i guess so, unless it's near a sea or river but its still the same.
Well than lets begin with our first step.
1. We need to make a new Item Called " extinguisher/water bucket "
- So we go to our database ( F9 )now open the Items tab and create a new item (by changing maximum/increase array way down at the list and make it bigger )
and set all like in the picture. ( I made it in the first array but It is not neccesary if you would put it like in array 100 its the same.) Make sure its not consumable.
Picture 1
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg117.imageshack.us%2Fimg117%2F6259%2F56975305sj0.jpg&hash=b69efae20887c85af7c008e13100580c5abe9b23)[/spoiler]
Now we have created a Bucket. Yaaay :)
If you want to have an effect of a bucket that can be used twice, ( example I put the fire out with my bucket and I will gain a half full bucket. )
Time for the fountain.
2. We need a fountain that will get us the water.
- So make a new event on your map.
- Now look at picture 2 and you might see I used some variables, don't worry I will try to explain it all the best I can.
Picture 2
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg50.imageshack.us%2Fimg50%2F404%2F22oa6.jpg&hash=2a9215ccbdc944a5b8c6edf678ec4e61ca9d6b7f)[/spoiler]
As seen in the picture we first make a choice if the water wants to be refilled.
If Yes, A variable will be added by 1 and after the Variable it checks how big it is.
A simple picture just do it like here..
Set it to ADD 1 and to a new Variable at Single doesnt matter where As long its a new one that is not used yet and give it a name.
Picture 3
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg338.imageshack.us%2Fimg338%2F5292%2F4setvariablekl5.jpg&hash=d2a5eaabbf4651587027b1404142ebd86de4234d)[/spoiler]
Now lets go to conditional branch.
Picture 4
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg252.imageshack.us%2Fimg252%2F5611%2F3setconditionalbranchyk0.jpg&hash=02c288fc19ba8da8b08cb51cc783e8d0925e461d)[/spoiler]
It checks if the Variable set in the variable we set before is less than 3 so we can set our options for the limit of the bucket.Don't forget to check the box at the bottom to ON.
We do want a limit not ? because If you have to much buckets where is the fun of letting the player do all the work ?.
Simply put in a confermative tekst message to say you have gained some new water.
next - Change items [Water Bucket], + 1
to add the water bucket.
Now we will continue to the Else handler.
Text message:You can't carry anymore water.
Control Variables: [XXX: Maximum of water] = 2
Where XXX put in the array your variable is stored
End of the fountain Event :o Might look allot but its because i brable allot.
And finnaly the flame's
We are almost done ;) Just some more of my brable so i will be sure you understand it .
Picture 5
[spoiler](https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg117.imageshack.us%2Fimg117%2F2713%2F5firebv7.jpg&hash=80ae0ca0294c67adea29ac0df6c1d61ef8f99e4a)[/spoiler]
Well as you see again we use variables.
First we start simple again just some text and a choice.
I think you might know how it works now.
Now we use another Conditional branch.
Conditional branch:[Water Bucket] in Inventory
I'm assuming u might know how Conditional branches work now.
so just make it so it will check if player has the item Water Bucket in inventory.
and after that.
Change Items: [Water Bucket], - 1
Control Variables: [XXX: Maximum of Water] -= 1 Subtract the Water Variable by 1
Text: Water extinguished
Now we are going to make a new variable and set it to 0
Control Variables: [XXX: Fire out] += 1
This variable will be added when it is extinguished and will be very useful in the end if you need to make a sort of system where you need to extinguish all of the fire in a map ( don't forget to name and remember how much you will use this event.
Time for our first Switch :o
Control self switch:A =ON
Else Handler = Text make something up as "no water" or Its too hot "
Branch End
When [No]
Text: Did not put out fire.
Make a second page and set condition to Self Switch A = ON.
Only Event on this page can be Erase event parallel process to reduce lag.
END OF FIRE EVENT ( YOU CAN NOW COPY, PASTE THIS FIRE EVENT ALL OVER THE MAP IF YOU LIKE )
Whew We are done !!!
No wait..
We forgot the ending sequence of our map if you want it though..
Remember i put in a variable that counts how many fire we had putted out?
Well simply make that Event and make a Conditional Branch as followed in the pic.
Picture 6
[spoiler]
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg404.imageshack.us%2Fimg404%2F2834%2F6putoutcondbranchje1.jpg&hash=ff6f2651bab3ecd0c266e281dbb91f583464ceea)
[/spoiler]
Make the greater than or equal to to the number of fire you want to be putten out and now put an ELSE handler to say "Take out the fire you moron "
Or if you like something else do that.
Thanks for reading my Tutorial I try'd to explain everything the best i could if im missing something please tell
and If you need to tell me something do tell.
Feedback is much appreciated.
Phew finnaly done.
Oh, I also included a demo.
Great tutorial, man. Good for people who don't know how to use variables....who doesn't know how to use variables? Ha.... :'(
Lol. Nice renaming of the topic. And this is actually so simple to do! XD But, some people need help. Nice tutorial, though.
Thanks for the help Snailer:), now to see if I can get this working:D! ;8
No problem, !
And if something is not working please tell me what happened and MAYbe if possibble post your demo so I can see what happened and I can rejust my Tut
Uh...just one problem, okay, so the water-fire thing worked out, but my character can still go into the building while its on fire, even though he didnt put out ANY fires! Nice tut btw!
Okay I see what you did wrong
Make the tent entrance an event and put the Variable that counts the flames that were put out as an CONDITIONAL BRANCH
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fimg404.imageshack.us%2Fimg404%2F2834%2F6putoutcondbranchje1.jpg&hash=ff6f2651bab3ecd0c266e281dbb91f583464ceea)
like that but make the 8 bigger as you have more flames
and put in the ELSE handler a message that you cant enter yet AND NOTHING ELSE
+ in the Conditional handler put the teleport event..
Or other said The ELSE happens when the fires havent beed putten out.
The lines RIGHt after the conditional branch ( just in front of the ELSE )
will be activated when the flames are putted out.
oopsie, I just sent you a PM asking for help..jsut ignore it..
Ive tried without water, it says I need more water, I got water, and it still says I need more, I keep on tryign for who knows how long and still...NOTHING! Help:(!
wait.. In the PM you send me the variables showd 0 are all your variables zero ?
And I dont have time to go through my Tutorial now and see if i did something wrong.
lol yes i see you havent used the variables right Shall i fix them for you right away ?
If you dont mind:)!
Okay I fixed DaleStrickland's problem he got the Variable's wrong :P
So be sure to check them !
Bump ::)
Picture 6 was bugged, re-uploaded.
Lol it still seems to be bugged.
EDIT: Nvm. It's working now.
I haven't seen you for awhile Snailer
Quote from: modern algebra on January 27, 2008, 05:15:39 PM
I haven't seen you for awhile Snailer
Im back =D
and still luving u <3