ID:169003
 
Well, to begin, i have begun to code in a mini boss for my game(Called "Water Magician"). The main idea is, the boss floats in a single spot, with an orb levitating over his head. if he's hit, he selects another spot in the room to teleport to. The orb, meanwhile, is spraying water down everywhere into the room. This is the graphics part, and i think i can do most of the stuff required(pixel_y for the orb, missle or something like that for the spraying water part, and locate() for the teleport part), but i have now run into an extremely difficult question, on something ive never even begun to attempt, but that i am pretty sure is possible. Basicly, what i want to happen is, while the player is fighting the battle, the water let off by the orb is raising the water level in the room below(Note that the room starts out as just a simple square room with some standard floor tiles laid out). Eventually, the water level will reach a maximum height, and cracks will start appearing at certian points in the floor as the pressure and water level continues to rise. The cracks should eventually break, and begin flooding the room. Should the room be completely flooded before the player kills the magician, the player dies. Also, should the player kill the magician, the water in the room dissappears(The holes from the cracks stay, just the water dissapears), and the water level returns to normal. Can someone tell me how to go about doing all of this? Thanks in advance, and I hope to see my game up soon!

--Reinhartstar
Ok,its relativly simple, so ill tell u the basic crud.

OK..create a ticker (follow examp so it doesnt lock up and create errors) The time is 3 minutes and water interval is 20 secs. MOst is self explanatory. I didnt really check it in DM, so sry if any errors...

mob/WaterMagician
HP= //HP...?
New()
. = ..()
if(mob/Hero/M in oview(10,src))
src.WaterLvl()

mob/Hero/Player
HP= //HP...?

mob/var
waterlvl
HP

mob/proc/WaterLvl()
while(src.waterlvl!=9)
if(src.waterlvl==9)
for(mob/Hero/M in oview(20,src))
if(src.HP>0)
M.HP=0
// M deathcheck proc here
else
../
if(src.HP<=0)
src.waterlvl=9
if(src.waterlvl==3)
//put some code for cracks here
spawn(200)
src.waterlvl++
//do some thing to make it look as if water rises
In response to Lou
Ok thanks man