ok after a couple of days of trying to get this to work I still am having problems.
mob/romulan
icon = 'person.dmi'
icon_state = "romulan"
cl = -1
hp = 5
var/mob/M
New()
..()
firePhaser()
proc/firePhaser()
spawn(30)
if(M in view(5,src))
M << ""
could someone take a look at this im still not able to get it to do what I want
ID:177384
Sep 15 2002, 4:43 pm
|
|
Sep 15 2002, 5:45 pm
|
|
It would help if you told us what it was supposed to do, specifically.
|
Treasurecat wrote:
ok after a couple of days of trying to get this to work I still am having problems. I don't see that it'd do much of anything. You never told the proc what M is, so M is probably null. Lummox JR |
In response to Skysaw
|
|
Skysaw wrote:
It would help if you told us what it was supposed to do, specifically. when the user is within view of the mob/romulan then it prints out a message to the user. |
In response to Treasurecat
|
|
Treasurecat wrote:
Skysaw wrote: mob/romulan icon = 'person.dmi' icon_state = "romulan" cl = -1 hp = 5 New() ..() firePhaser() proc/firePhaser() for(var/mob/M in view(5,src)) M << "[src] fires a phaser at you!" spawn(30) firePhaser() |
In response to Lummox JR
|
|
here is something else I tried but still does not do the trick
mob/romulan icon = 'person.dmi' icon_state = "romulan" cl = -1 hp = 5 var/mob/M New() ..() firePhaser() proc/firePhaser(mob/M as mob) if(M in view(5,src)) spawn(30) M << "" |
In response to Treasurecat
|
|
Treasurecat wrote:
here is something else I tried but still does not do the trick Of course it doesn't. You have yet to set M to anything, so it's still null when it reaches your proc. Duh! This is what I was saying in my post. M is null, because you never set it. Just like a proc won't run if you don't call it. Lummox JR |
In response to Skysaw
|
|
Thank you Skysaw!!!
|