ID:173478
 
obj
var
struggle = 0

obj
kamehameha
verb
Kamehameha()
set name = "Kamehameha"
set category = "Fighting"
var/obj/H = new/obj/kame
H.dir = usr.dir
H.loc = usr.loc
while(H)
step(H,H.dir)
var/turf/T = H.loc
if(T.density == 1)
sleep(150)
del(H)
break
for(var/mob/M as mob in T)
if(M == usr)
continue
usr<<"You shot [M]!"
sleep(150)
del(H)
if(struggle == 1)
var/obj/HS = new/obj/kames
HS.dir = usr.dir
HS.loc = usr.loc
while(HS)
step(HS,HS.dir)
var/turf/T = HS.loc
if(T.density == 1)
sleep(150)
del(H)
break
for(var/mob/M as mob in T)
if(M == usr)
continue
usr<<"You shot [M]!"
sleep(150)
del(H)

obj
kame
icon = 'kame.dmi'
icon_state = "beam"

obj
kames
icon = 'kame.dmi'
icon_state = "Struggle"


how can i make if kame bump kame they both change to kames?
can anyone help me?
In response to CrazyFighter
look up Bump() and istype() and isobj()
In response to Airjoe
i know about the bump() but where would i put it and what would i put in the ()
In response to CrazyFighter
Take a guess.

Lets think here.
Kame happens to be an object. We're looking for if an obj/Kame is going to bump another obj/Kame. DING DING DING!

obj
Kame
Bump(obj/O)
if(istype(O,/obj/Kame)&&isobj(O))
//Do whatever here
In response to Airjoe
Airjoe wrote:
Take a guess.

Lets think here.
Kame happens to be an object. We're looking for if an obj/Kame is going to bump another obj/Kame. DING DING DING!

obj
Kame
Bump(obj/O)
if(istype(O,/obj/Kame)&&isobj(O))
//Do whatever here

obj
Kamehameha2
verb
Kamehameha(mob/M in oview(6))
set category = "Police"
set name = "Kamehameha"
usr.icon_state = "weight-training-right"
usr << "Kame"
sleep(10)
usr << "Hame"
sleep()
usr << "Ha"
walk(Kame1,Kame1.dir)
var/Kame1 = new /obj/items/blastbottom(locate(usr.x,usr.y-3,usr.z))
spawn(15)
del(Kame1)

obj
items
blastbottom
icon = 'kame.dmi'
icon_state = ""
Bump(obj/O)
if(istype(O,/obj/Kame)&&isobj(O))
obj.icon_state = "struggle"

test2.dm:22: Inconsistent indentation.
test2.dm:23: Inconsistent indentation.
In response to CrazyFighter
Don't copy and paste. I write most of my code that helps people on the forum, in the "Body" text box. So, I can only use spaces. 4 spaces = 1 tab when I write.
In response to Airjoe
i did not copy and paste
In response to Airjoe
&&isobj(O) is redundant.