mob
verb
Kamehameha() // Verb used for firing the beam
if(usr.firing==0) // If the mob's firing var is one...
usr.icon_state = "kameh"
usr.firing = 1 // Sets the firing var to 1, so he cant fire another beam
usr.move = 0 // Disables the mob's movement
usr.icon_state = "kameshoot" // Sets the mob's icon_state
usr.Beam() // Calls the Beam() proc
return
else // If the firing var isn't 1...
usr.icon_state = "kameh"
spawn(2)
usr.icon_state = ""
usr.firing = 0
usr.move = 1
for(var/obj/Beams/Head) //For all objects in the Head's Beam list...
del(Head)
for(var/obj/Beams/list/Beam) //For all objects in the Head's Beam list...
del(Beam) //Delete any objects found
Problem description:
Ok, I can compile and run this with no errors, but see my problem arises when say two people use this verb and create the said kamehamehas.. If the person clicks the verb again it stops the kamehameha for that said person, but deletes the head and body of all kamehamehas in the world entirely, from what I have tested. I need to find a way to make it to where when the player clicks the verb a second time it only get's rid of that usr's kamehameha wave and not every kamehameha..
2. Whenever the head and beam are created, add it to it's owners list (which you should put in). Then, delete everything in that list. Check out Kaioken's beam demo, it'll provide the example to what I'm talking about.