turf
Point1
icon = 'floor.dmi'
icon_state = "Point"
density = 0
layer = 3
Enter()
for(var/mob/M in oview(0))
if(M.NPC == 0)
Level1 += 1
Level2 += 1
del(src)
if(M.NPC >= 0)
Level1 += 1
Level2 += 1
del(src)
else
()..
ID:171111
![]() Nov 9 2004, 1:31 pm
|
|
![]() Nov 9 2004, 1:33 pm
|
|
Aha! You said "entered" try that Entered()
|
turf I'm not sure what you are trying to do though, if you do del(src) or del(M) it will delete the user causing him to logout I think. That should work though. |
Fixed.
turf Explanation: I removed if(M.NPC) and if(!M.NPC) because either way, you made it do the same thing. I've added "as mob" to ensure that it will only effect mobs who enter the turf. Removed density=0 because by default, density is equal to 0 anyway. I removed "..()" because by your definition, that could never happen: if(!M.NPC) means "if M is equal to 0, null, etc...". if(M.NPC) means "if M is anything BUT 0, null, etc...". If NPC was negative, if(M.NPC) would still return 1. |
You can try making it an obj, I'm not sure if you need it as a turf though, but if you make it an obj it should work.
|
Nope
obj |
Well, the one thing I could think of would be that M.density is equal to 0. To call Entered(mob/M as mob), M density must be equal to 1; M must be desne.
|
Entered() is a turf proc. Objects and mobs can enter things, but Entered() is deifned as turf/Entered()
|
Well, it may be that M's density isn't equal to 1 at the time Entered() is called. let's try some debug messages:
turf Please tell me what this outputs. This should narrow down the bug considerably. |
In that case, either M isn't a mob, or the turf isn't actually being entered. Therefore, the problem is located in a different part of your coding.
|
Try this:
turf Just realized my error. Try that. |