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
()..
1
2
ID:171111
Nov 9 2004, 1:31 pm
|
|
Nov 9 2004, 1:33 pm
|
|
Aha! You said "entered" try that Entered()
|
In response to N1ghtW1ng
|
|
still doesnt work
|
In response to Strawgate
|
|
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. |
In response to N1ghtW1ng
|
|
But i want it to delete the turf not the mob...
|
In response to Strawgate
|
|
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. |
In response to Wizkidd0123
|
|
still doesnt work.... its not deleting it
|
In response to Strawgate
|
|
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.
|
In response to N1ghtW1ng
|
|
Nope
obj |
In response to N1ghtW1ng
|
|
Of course it wouldn't work; Entered() is a turf-only proc.
|
In response to Wizkidd0123
|
|
.> In the ref. it gives an obj as an example I think, i'll double check. |
In response to Strawgate
|
|
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.
|
In response to N1ghtW1ng
|
|
Entered() is a turf proc. Objects and mobs can enter things, but Entered() is deifned as turf/Entered()
|
In response to Wizkidd0123
|
|
icon = 'man.dmi' |
In response to Strawgate
|
|
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 response to Wizkidd0123
|
|
Theres something wrong with the enter proc because nothing is showing
|
In response to Strawgate
|
|
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.
|
In response to Wizkidd0123
|
|
im moving on top of the turf with a dense guy and it doesnt disapear any idea where the error is?
|
In response to Strawgate
|
|
Try this:
turf Just realized my error. Try that. |
In response to Wizkidd0123
|
|
Still doesnt work....
|
1
2