Well this is my second tut WEEEEEHere 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 1Now 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 2As 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 3Now lets go to conditional branch.
Picture 4It 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
Might look allot but its because i brable allot.
And finnaly the flame'sWe are almost done
Just some more of my brable so i will be sure you understand it .
Picture 5Well 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 InventoryI'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], - 1Control 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] += 1This 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
Control self switch:A =ONElse 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 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.