ID:171111
 
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
()..
it doesnt delete the point when it was entered
Aha! You said "entered" try that Entered()
In response to N1ghtW1ng
still doesnt work
In response to Strawgate
turf
Point1
icon = 'floor.dmi'
icon_state = "Point"
density = 0
layer = 3
Entered()
for(var/mob/M)
if(!M.NPC)
Level1 += 1
Level2 += 1
del(M)
if(M.NPC)
Level1 += 1
Level2 += 1
del(M)
else
..()





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
Point1
icon = 'floor.dmi'
icon_state = "Point"
layer = 3
Entered(mob/M as mob)
Level1 += 1
Level2 += 1
del(src)//In this case, src would refer to the turf, Point1


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
Point1
icon = 'floor.dmi'
icon_state = "Point"
// layer = 3
Entered(mob/M as mob)
Level1 += 1
Level2 += 1
del(src)//In this case, src would refer to the turf, Point1
doesnt work it doesnt delete or add to level1 or level2
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'
icon_state = "c"
density = 1
loc = locate(10,6,1)
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
Point1
icon = 'floor.dmi'
icon_state = "Point"
layer = 3
Entered(mob/M)
if(ismob(M))
world << "[M] has entered [src]."
M << "PRE: Level1 is equal to [Level1]. Your density is [M.density]."
Level1 += 1
Level2 += 1
M << "POST: Level1 is equal to [Level1]"
del(src)


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
Point1
icon = 'floor.dmi'
icon_state = "Point"
layer = 3
Entered()
if(ismob(usr))
Level1 += 1
Level2 += 1
del(src)


Just realized my error. Try that.
In response to Wizkidd0123
Still doesnt work....
Page: 1 2