area/nokill
Entered(mob/M)
M.canattack=0
Exited(mob/M)
M.canattack=1
Problem description:
So this is in the spawn point, but it doesn't seem to work. Did I screw it up somewhere?
ID:142934
Jan 29 2008, 8:33 am
|
|
Code:
area/nokill Problem description: So this is in the spawn point, but it doesn't seem to work. Did I screw it up somewhere? |
Jan 29 2008, 11:44 am
|
|
Are you doing a check for canattack in your attack procedure? Make sure you do that or it's just a pointless variable.
|
Entered() and Exited() are never called if you modify loc directly. Instead of what you have, do this:
area |
In response to Jholder84
|
|
Yeah. if usr.cannattack==0 then the user can't attack.
|
In response to Garthor
|
|
Okay, so I added that in, but how do I get the area from the code to the map, since it doesn't have a name?
I tried: area But it didn't work. I had an error. |
In response to GohanIdz
|
|
So at the beginning of your attack proc you have
Attack() Is that basically right? :EDIT: And let me further ask... Do you want the mob to not be able to attack or do you want them to not be attackable? |
In response to GohanIdz
|
|
The variable is already defined, so you'd just do pacify=0, not var/pacify=0.
And it would be 1 to prevent killing, not 0. |
In response to Jholder84
|
|
I want them not to be able to attack.
I put in the pacify bit though, so I guess we'll see if that works. |