ID:156600
 
As the Topic says. How do I make the mob face the mouse wherever the mouse is pointing. So if I'm walking north and moving my mouse south-east, my character will face the mouse walking north still. If you understand what I mean
Hmm im no expert on the mouse functions but i dont think you can make a mob face a way by just moving your mouse.

You can although make a mob move using mouseclicks and make it move in the direction of the click
In response to Midgetbuster
I know how to make the mob move with clicks. But I just didn't know if it was possible to make the mob face the mouse at all times without making it tape a step
In response to Isenggard
well you could do something like this

client/North(){mob.Move(get_step(mob,NORTH), mob.dir)}


then you could use MouseOver() proc in turfs to change the mobs direction to the turf the mouse passed over(use get_dir()). well hope that helps
In response to Masschaos100
I got it working with MouseEntered() and get_dir O.o thanks for the tip on get_dir don't know why I didn't think of it
In response to Isenggard
new problem. How do I make a separate Icon follow mouse WHILE the mob is moving with the normal icon.

ex:
the mob is going north so the Movement states are active. But I wanna move my mouse down south. so the head turns south while body is still walking north without it being affected
In response to Isenggard
is it really impossible to do what I am trying to do? I do not think so... O_o
In response to Isenggard
You if you want to move with MouseEntered() and you want to face the mouse with the same procedure... yeah, it is impossible because of this:

- MouseEntered, walk North; face north
- MouseEntered, walk Northeast; face northeast
- etc

The only way this would work independently is if you had two different methods

For example, make the user START/STOP walking by clicking a /turf - in which they'll walk to the DIRECTION (not the location!) where you clicked.

That way, it frees up MouseEntered() for the mob facing.
In response to GhostAnime
GhostAnime wrote:
"... impossible ..."

Virtually nothing is impossible.
The easiest way to get this done would make the main /mob or player the bottom of the icon, or the legs.
Then have something like an /obj keep a constant location on top of the /mob or player, and have said /obj's direction face the direction in MouseEntered().
The legs will continue their normal operation of direction so North is North, but the upper portion will face the Mouse.
In response to Maximus_Alex2003
Maximus_Alex2003 wrote:
GhostAnime wrote:
"... impossible ..."

Virtually nothing is impossible.
The easiest way to get this done would make the main /mob or player the bottom of the icon, or the legs.
Then have something like an /obj keep a constant location on top of the /mob or player, and have said /obj's direction face the direction in MouseEntered().
The legs will continue their normal operation of direction so North is North, but the upper portion will face the Mouse.

I guess I should have said in the first sentence that the same method instead of the same procedure. Though you should have read my sentence a bit more carefully; I thought that the person moved via MouseEntered(), which is not the case when I looked back just now.

I never said it was impossible to have the legs in one direction and a face in another, what I was trying to say is that it is impossible to make a person move in one direct and face another when using the same method (which means no differentiation between when to walk and when to face).
In response to Isenggard
Masschaos100 wrote:
well you could do something like this

> client/North(){mob.Move(get_step(mob,NORTH), mob.dir)}
>

then you could use MouseOver() proc in turfs to change the mobs direction to the turf the mouse passed over(use get_dir()). well hope that helps

Move(NewLoc, Dir)

dir is the direction the mob will face while moving O-O
In response to Maximus_Alex2003
Yeah that is what I am trying to do. Have the top half have its own movements somehow
In response to Isenggard
overlays would probably be best, though they still wouldn't work very well
In response to Falacy
I have seen this work on flash before.

I guess I'll figure it out myself. O.o

thought about overlays but didn't know if that would work right
In response to Isenggard
BYOND doesn't even close to matching Flash's functionality, especially when it comes to graphical manipulation.
http://www.bear-tracker.com/mousyface.jpg

Oh... Sorry, I misunderstood.