ID:270293
![]() Mar 2 2006, 4:42 pm
|
|
Okay, my water obj is dense and when it bumps into dense turfs with a certain variable set to 1 I want the water to move into it's tile. Someone suggested to me to use Bump(), but after I looked it up real quick in the reference I saw it only works with Move(). However, the water moves with step_rand(). I saw get_step_rand(), but I don't know how to use it (when the step_rand fails) to find the dense object and check if it has the var set to 1 and if it does move the water into its tile. If someone knows an easier way to do this I'd appreciate your input, but I have all the vars set for the objs in all ready so I wouldn't want to change from that indentification system.
|
Unknown Person wrote:
step_rand() calls Move(), so Bump() would work. You also could overwrite Enter() to allow these water objects in. Okay, although what I didn't tell you is that i've already tried in numerous ways with Bump(), and it's not working for me, even if I make it as simple and straightfoward as possible. For example: water I don't know why the water won't move into an object's tile if it's movable or waterable; this is very straightfoward code. I tried overriding the Enter(), but I also heard that it was only for turfs and areas, not objects. I set the objects' densities to zero and overrode the Enter(), actually based off of one of your code segments, but to mobs it acted as the object was stil undense. |
step_rand obviously already checks, if the new location has density. Try: step(src, pick(NORTH, SOUTH, WEST, EAST, NORTHWEST, SOUTHWEST, SOUTHEAST, NORTHEAST))
|
I'd actually use Enter(). Also, Enter() is located under /atom, so it will work for mobs, objs, turfs, and areas.
Enter(obj/O) |
turf I think that's a bit more of what you're looking for |
step_rand() calls Move(), so Bump() would work. You also could overwrite Enter() to allow these water objects in.
~~> Unknown Person