ID:141949
 
Code:
mob
Entered(atom/movable/o)
world<<"[src] has been attempted entrance by: [o]"
if(isobj(o))
world<<"[o] was an object!"
o.trigger(src)
.=..()


Problem description:

Okay, I have a non dense object that I want to still cause damage. Therefore I've attempted in at least 20 various ways of getting it to work to no such luck >_>. Kay, why don't I receive the messages when the bullet enters the mob?
Because things don't enter mobs, would be my guess. For something to enter a mob, it'd need to be added to it's contents list. This happens with turfs when you walk on them, but not non-dense mobs.
Enter() is called when something enters the contents of something else. Unless you're moving the bullet into the mob's contents, it won't be called. Moving it onto the mob's location won't call it for the mob, but the mob's location.


For collision detection, I use the Move() proc of the projectile and check for dense objects directly ahead of it.
In response to Kaiochao
Okay, thanks. :p
In response to Speedro
Another odd little problem:

Whenever I move it checks for anything in src's location with a trigger (I think there's something wrong with that). If it has a trigger, use the trigger. It seems right to me, but for some other magical reason I can't figure out why it doesn't. >_>


mob
var
canmove=1
Move()
if(!canmove)
return
.=..()
for(var/atom/a in src.loc)
a.trigger(src)
turf
trigger()
world<<"duh"


EDIT:

turf
trigger()
world<<"duh" //DUH is right. >_>
Maybe I'm just tired. When I quick-checked over the properties of my spike, I found it had a density of 0. However, when I finally got around to reading all of it, I had 'density=1' again! Wow. >_>
In response to Speedro
You didn't include src.loc itself in the triggering. You're looping through all atoms in src.loc (including, incidentally, src--best not to trigger src), but src.loc is by definition not in itself.

Lummox JR