obj
var
mob/owner3 = null
total = 0 // The total number of spaces the beam's head is allowed to move
moved = 0 // The number of spaces the beam's head has moved
list/Beam = list() // A simple list to keep track of the beam's body
Beams
density = 1
Head
density = 1
icon = 'kaiattack Big Bank Ka Ma Ha Head.dmi'
icon_state = ""
New()
src.icon = usr.head
src.icon += rgb(usr.kicustomred,usr.kicustomgreen,usr.kicustomblue)
src.tail = usr.tail
src.kicustomred = usr.kicustomred
src.kicustomgreen = usr.kicustomgreen
src.kicustomblue = usr.kicustomblue
src.aname = usr.aname
src.kiamount = usr.kiamount
src.powerlevel = usr.powerlevel
spawn(2) // Delay is abit...
Start() // Calls the Start() proc
Check()
..()
proc
Start()
walk(src,usr.dir,1) // Makes the beam's head move
Check() // This is the proc used to delete the beam when its at the map's edge
while(src)
var/turf/T = get_step(src,src.dir)
if(!T)
owner3.kame = 0
owner3.icon_state = ""
owner3.move = 1
if(src)
for(var/obj/O in src.Beam)
del(O)
del(src)
sleep(1)
Bump(atom/A)
if(ismob(A))// If whatever the head bumps is a mob...
var/mob/characters/M=A
flick('Explosion.dmi',M)
del(src)
view(owner3) << "[src.owner3]'s [src.aname] hits [M]!" // For all in the owner3's view, gives a message
M.damage += ((owner3.powerlevel/M.powerlevel) * 7)
M.Die()
src.density = 0
sleep(5)
src.density = 1
del(src)
else if(istype(A,/turf/)) // If whatever the head bumps is a turf..
owner3.kame = 0 // Allow the owner3 to fire another beam
owner3.icon_state = "" // Give them their default icon_state
owner3.move = 1 // Allow them to move
for(var/obj/O in src.Beam) // Checks for objects in the Head's Beam list...
del(O) // Deletes any objects found
del(src) // Deletes the head
else
if(!ismob(A) && !isturf(A) && !isobj(A) && !isarea(A))
owner3.kame = 0 // Allow the owner3 to fire another beam
owner3.icon_state = "" // Give them their default icon_state
owner3.move = 1 // Allow them to move
for(var/obj/O in src.Beam) // Checks for objects in the Head's Beam list...
del(O) // Deletes any objects found
del(src) // Deletes the head
Body
icon = 'kaiattack Big Bank Ka Ma Ha.dmi'
icon_state = ""
density = 1
Move()
if(istype(src,/obj/Beams/Head)) //If the obj trying to move is The Beam's Head...
var/obj/Body = new/obj/Beams/Body(src.loc) // Create a new body at the current location
Body.owner3 = src //Set the owner3 of the body to the Head
Body.icon = src.tail
Body.icon += rgb(src.kicustomred,src.kicustomgreen,src.kicustomblue)
src.Beam.Add(Body) // Adds the Body to the Head's Beam list, for later tracking and deletion of it
Body.dir = src.dir // Set its direction
moved++ // Adds 1 to the Head's moved var
if(moved == total) // Checks to see if the spaces moved(the moved var) is equal to the spaces its allowed to move(the total var)
owner3.kame = 0 // Allows the owner3 to fire another beam
owner3.icon_state = "" // Sets the owner3 to its default icon_state
owner3.move = 1 // Allows the owner3 to move
if(src) // Just incase...checking to make sure the object is still there, we dont want any runetime errors, do we? =p
for(var/obj/O in src.Beam) // Checks for the objects in the Head's Beam list
del(O) // Delete any objects found
del(src) // Deletes the Head
del(Body)
..() // Continues with the Move() procs norm
mob
proc
Beam()
var/obj/Head = new/obj/Beams/Head() // Creates the Beam's Head
if(usr.dir == NORTH) // If the mob's dir is NORTH...
Head.loc = locate(usr.x,usr.y+1,usr.z)
if(usr.dir == SOUTH) // If SOUTH...
Head.loc = locate(usr.x,usr.y-1,usr.z)
if(usr.dir == WEST) // If WEST...
Head.loc = locate(usr.x-1,usr.y,usr.z)
if(usr.dir == EAST) // If EAST...
Head.loc = locate(usr.x+1,usr.y,usr.z)
Head.total = 12 // Sets the total to 6, that means the beam's head can move 6 spaces before deletion
Head.dir = usr.dir // Sets the Head's dir to the mob's dir
Head.owner3 = usr // Sets the Head's owner to the mob
obj
bbk
tech=1
verb
bbk()
set category = "Fighting"
set name = "Big Bang Kame Hame Ha"
src.head = 'kaiattack Big Bank Ka Ma Ha Head.dmi'
src.tail = 'kaiattack Big Bank Ka Ma Ha.dmi'
src.aname = "Big Bang Kame Hame Ha"
if(usr.kame == 1)
usr << "<tt>You are currently using Big Bang Kame Hame Ha."
if(usr.kame == 0)
if(usr.movable == 0)
usr << "<tt>You cant now."
if(usr.movable == 1)
if(usr.Ki <= 500)
usr << "Your Out Of Ki."
usr.Ki = 1
if(usr.Ki >= 500)
view(6) << 'bbk.wav'
view(6) << "<font color = red>[usr]:<font color = white> <tt>Big Bang Kame Hame HA!!!"
usr.Ki -= 500
src.kame = 1 // Sets the kame var to 1, so he cant fire another beam
src.movable = 0 // Disables the mob's movement
src.icon_state = "" // Sets the mob's icon_state
usr.Beam() // Calls the Beam() proc
sleep(10)
src.kame = 0
Problem description:
Here what the probelm when i shoot the beam nothing happens but when it hit's a mob hexpolsion comes over him.
Here is hwta i want to hapeen is when you shoot the beam it shows and go stright
So, it does nothing, but it hits a mob and an explosion comes over them? I don't have any idea what you mean.. it has to be moving to bump the mob.