How would i do this?
I tried:
obj
-asd
--density=0
--Enter(var/obj/projectile/p)
---if(istype(p))
----world<<"working"
---return ..()
but then i realized that Enter only works in turfs and bumping only works if the target has density=1.
How would I make it so that the projectile can hit the density=0 obj?
![]() Apr 18 2012, 5:51 pm
|
|
One option is to run a check within the projectile's movement.
|
Please make sure to use the <dm.>and </dm.> tags without the .'s in them to post your code correctly. As for your problem, it could be handled a few ways.
Could you please provide a bit more info? I'm not quite sure why you would want to hit an object that is not dense. Running a check whenever it moves is, however, one method that would likely work. |
Toddab503 wrote:
Please make sure to use the <dm.>and </dm.> tags without the .'s in them to post your code correctly. As for your problem, it could be handled a few ways. < = < |
atom/movable/proc/Bumped() Every time this projectile moves, it will check the contents of the turf it's over to see if atom/b is the atom (atom/a) that you are looking for. |