I am trying to make it so that the eye is always looking two spaces in front of the player. Could someone please help?
I have this so far:
mob
proc
Eye()
if(src.dir == NORTH)
client.eye = locate(x,y+2,z)
if(src.dir == SOUTH)
client.eye = locate(x,y-2,z)
if(src.dir == EAST)
client.eye = locate(x-2,y,z)
if(src.dir == WEST)
client.eye = locate(x+2,y,z)
Ticker()
spawn while(1)
sleep(3)
Eye()
New()
if(client)
Ticker()
Also, could someone work out why this verb won't work?
Take_Off()
set src in usr
usr.overlays -= src
usr << "You take the [src] off"
src.suffix = null
The suffix changes, but the overlay isn't removed.
Thanks in advance
ID:176660
Dec 22 2002, 7:28 am (Edited on Dec 22 2002, 7:33 am)
|
|
In response to Metallica
|
|
Not quite what I want. I'm trying to make it so that your guy isn't at the centre of your screen. If you're looking north, the screen is 2 spaces north and if you're looking east, the screen is 2 spaces east etc.
|
In response to Hazman
|
|
yeah that's what lazy_eye does
|
In response to Metallica
|
|
lazy_eye just sets the distance you can travel before the camera centres on you again, so If I set lazy_eye to 4, I'd have to move 4 spaces before the camera centred on me again.
|
In response to Hazman
|
|
lazy eye, thats a funny thing, i thought he was joking when i read his post, lol.
|
In response to Maz
|
|
I checked out Nadrews portfolio and the library/thing you are refering to is non-existant.
|
client RaeKwon |
In response to RaeKwon
|
|
My suggestion would be to create an obj to go along with this, for any mob who has a client. Make it change positions any time the mob moves.
obj/eye The nice thing about this system is that the eye will adapt to direction changes smoothly, without jerking about. It will move more quickly when a bigger change is needed, however, so that if you turn and start walking it should (in theory) catch up. Lummox JR |
In response to Lummox JR
|
|
Thanks Lummox JR, but I think I'll go with RaeKwon for ease.
*Says in Jackie-Chan Adventures Uncle style* One more thing. How could you use the HUD to make some sort of highlight for your character, like a ring around him/her/it or something |
In response to Hazman
|
|
You'd have to use image() for that, look it up, you should get the idea.
|
In response to Lummox JR
|
|
The nice thing about this system is that the eye will adapt to direction changes smoothly, without jerking about. Ingenious... that's a feature I've wanted for a long time, and it never occurred to me that simply using an invisible dummy obj would suffice. |
In response to Lummox JR
|
|
You also might want to set the eye's animate_movement to SYNC_STEPS, so that the eye is in step with the mob.
|
In response to Lummox JR
|
|
For some reason, the eye jumps about for me when I change direction. Can you help?
|
In response to Hazman
|
|
Hazman wrote:
How could you use the HUD to make some sort of highlight for your character, like a ring around him/her/it or something Images would work nicely, as Nadrew suggested. The way I'd do it would be to create 4 icons for the 4 quarters of a circle, set up as directional icons with diagonal directions. highlight Lummox JR |
In response to Garthor
|
|
That sounds like a good idea too! Thanks.
|
In response to Hazman
|
|
Hazman wrote:
For some reason, the eye jumps about for me when I change direction. Can you help? In my code the eye should move fairly quickly but I wouldn't have thought instantly. One thing I suppose you could do is use n=min(n,1.5), so the "extra" speed is never more than a little above average. Lummox JR |
In response to Lummox JR
|
|
Also, I cn't call MoveEye() for some reason. It says that the proc doesn't exist.
|
client
lazy_eye = 2
but im a idiot so i dont' know.