i have a mob set up to go in a straight path in 1 direction but i want to know if there is a way to tell if he bumps into something and doesnt move anymore so at that point he would change direction.
to make it more clear:
How can i tell if a mob is not moving anymore so i can change its direction?
ID:149451
Apr 27 2002, 8:53 am
|
|
Apr 28 2002, 3:11 am
|
|
The Bump() proc is called whenever a movable atom (mob or obj) is blocked by something dense during a Move(). It is not called when the atom hits the edge of the map, so you may want to surround your map with a wall of dense turfs.
|
In response to Shadowdarke
|
|
but i am not using move i am using walk, i am making chu chu rocket. so bump wont work because they need to enter the tile, i have tries Enter() but that doesnt work for some reason.
|
In response to Netshark010101
|
|
now i still have the problem with the walls not changing the direction of the mobs but the arrows work except for 1 problem. I am using Enter but the mob doesnt enter the tile it changed direction 1 tile before it is supposed to, anyone have any idea on how to fix this?
|
In response to Netshark010101
|
|
Try Entered() proc.
|
In response to DarkTitan
|
|
sweet thanx
|
In response to Netshark010101
|
|
can Enter or Entered only be used on turfs, because i am trying to make it to where if the mouse (mob) enters the cat (mob) the mouse stops moving, flicks the death state, then deletes it, but it isnt doing any both just keep moving.
|
In response to Netshark010101
|
|
That is where you use the Bump() proc.
Sort of like this, mob/Mouse/Bump(atom/A) if(istype(A,/mob/cat)) flick("death",src) del(src) |
In response to DarkTitan
|
|
it still doesnt work, is there anything that specifically needs to be changed in there?
|
In response to Netshark010101
|
|
i just thought of something, is it because their density is 0? I can't change the density because they have to overlap and stuff or the will all just get stuck
|
In response to Netshark010101
|
|
Yes, Bump() only works with densage so it won't work with them being density=0.
|
In response to DarkTitan
|
|
damn so it is going to be impossible to make this game?
|
In response to Netshark010101
|
|
Netshark010101 wrote:
i just thought of something, is it because their density is 0? I can't change the density because they have to overlap and stuff or the will all just get stuck This FAQ entry should help: http://www.deadron.com/byond/ByondBwicki.dmb?TriggeredObjs |