obj
rockfall
icon = 'skills.dmi'
icon_state="rockfall"
rockfallb
name = "Rock Fall"
icon='skills.dmi'
icon_state="rockbutton"
DblClick(mob/M )
var.damage
if(usr.mp <= 0)
usr << "You don't have enough magic"
else
usr.overlays += 'skills.dmi'
usr.mp-= 5
sleep(50)
usr.overlays -= 'skills.dmi'
missile(/obj/rockfall, usr, M)
damage = 4
damage += usr.mpstr
damage -= M.mpdef
M.hp -= damage
M.overlays += /obj/rockfall
sleep(5)
M.overlays -= /obj/rockfall
and when i test it, and doublelcick it in inventory, it gives me this error
Rock Fall (/obj/rockfallb): DblClick("Skills")
runtime error: Cannot read "Skills".loc
proc name: DblClick (/obj/rockfallb/DblClick)
usr: Kablez (/mob)
src: Rock Fall (/obj/rockfallb)
call stack:
Rock Fall (/obj/rockfallb): DblClick("Skills")
ID:147998
Aug 17 2003, 4:49 pm
|
|
In response to Lummox JR
|
|
so i should use Click(mob/M)??
|
In response to Kablez
|
|
No... what he is saying is that the argument for DblClick() is not a mob so DblClick(mob/M) is not valid. So take out the mob/M and for everything that accesses a var using M: change to usr.
Resonating Light |
In response to Resonating_Light
|
|
wouldnt that attack the one who double clicked it then?
|
In response to Kablez
|
|
No.
|
In response to Resonating_Light
|
|
well i fixed it, now i want to know how toa dd objs to a list by using a proc, im using the proc lvl() to check if the usr is lvl 5 and add /obj/healb to list, how would i do thaT?
|
The correct thing to use instead of M is just usr.
Lummox JR