obj
attack
blast //This is the projectile, it can be used for anything
proc
smoke2(mob/user)
var/obj/smoke2 = new(user.loc)
smoke2.icon = 'Bolt_smoke.dmi'
smoke2.layer = MOB_LAYER + 0.2
flick("smoke",smoke2)
spawn(6)
del smoke2
Bump()
var/player/M
var/obj/attack/B
if(istype(M,/player)) //if its a player...
var/dmg=(round(power/M.endurance))
if(dmg<0)
dmg=0
M.health-=dmg
if(M.health<=0)
M.deathCheck() //kill them
smoke2(M)
view()<<sound('kiplosion.ogg')
sleep(90)
del(src)
Problem description:
Okay so, there are no compile errors or any in-game errors, but for some reason.. The "smoke2" proc doesn't flick or show the icon I inputted.
What's suppose to happen is, if a blast comes in contact with a player or mob, it flicks a smoke effect as if exploded on contact, sorta like how you'd see in Dragonball Z when characters block ki-blasts and a sort of smoke cloud evaporates before them.
Can someone help me find out what I'm doing wrong?
Bump(mob/M)
instead of var/player/M
on top of that, if you're passing a player datum into smoke2, depending on if it's an actual mob or not, it won't be able to detect user."loc" as one of the variables.