ID:171985
 
Sorry for all the questions lately but here's one more:

I need the camera angle(or client's eye) not to be at the centre of the screen but instead usr.x+1(right of the user's location)

i tried;

client
eye = src.mob.x+1


But that completely failed.
Here is an example on how you would do this.

mob
Move()
..()
client.eye = locate(x+1,y,z)


This makes it so that the eye relocates based on the mob's position after every move.
In response to Koshigia
Is there a way to get it to work at login?
In response to DeathAwaitsU
mob/Login()
client.eye=locate(whereever)
In response to Airjoe
No i've tried that before, nothing happened.
In response to DeathAwaitsU
src.client.eye = locate(whatever)

might work.
In response to Devourer Of Souls
That(and other similar ways) give me a black screen.
In response to DeathAwaitsU
so anyone there who can help?
In response to DeathAwaitsU
hhm.. not that formiliar with Client Eye.. but i think this should work..

mob
Login()
client.eye = locate(wheree4uwantit2b)


(PS: havn't coded for long, so my mind could be messed up a lill)
In response to ShakerDeath
ShakerDeath wrote:
hhm.. not that formiliar with Client Eye.. but i think this should work..

mob
Login()
client.eye = locate(wheree4uwantit2b)


(PS: havn't coded for long, so my mind could be messed up a lill)

Coded for a long time? you just joined byond in 03.

[link]
In response to XzDoG
no, new key in 03...

EDIT: no, it was new key in 01/02, but in 03 there was some kinda account crash, whatever -_-.
Don't call me a noob, i created 2/3 pretty succesfull games, and i'm making 2 new ones..
In response to ShakerDeath
Firstly, putting that right under login and not indented in the line after gives me 4 errors.

And if u do indent:

Read This And Then Read My Reply To It
In response to ShakerDeath
I've had a similar problem, I could only change client.eye when the client's mob was in view, try
mob/Login()
src.loc=locate(5,5,1)
src.client.eye = locate(src.x+4,src.y+3,src.z)
In response to Troglodyte
the problem with that is that the camera doesn't move with the player, it stays stuck at one location.
In response to DeathAwaitsU
Well then I guess you could overwrite Move() or North(), South(), East(), and West() to move client.eye with the mob.
In response to Troglodyte
ooh yea, i know this!
ehm.. ooh damnd, too lazy.. forgot..
well.. it could be.. hhm.. try this:

mob/Login()
src.loc=locate(5,5,1)
src.client.eye = locate(src.x+4,src.y+3,src.z)
src.client.eye += src //also try without src. in this line

//that's how it works with a hud -_-.. maybe look at some hud sources... i'm too tired to think right now.
In response to DeathAwaitsU
client
perspective=EYE_PERSPECTIVE


That right there makes it so you can move the client.eye about without the fear of the dreaded "black screen" occuring.
In response to Teh Governator
no that doesn't work very well because now the camera is still fixed in one place and if u go out the view then it doesn't give me a black screen but the camera doesn't follow my guy out.

I need it so the camera is constantly moving with my guy, by camera i mean client eye i think.
In response to DeathAwaitsU
client
perspective=EYE_PERSPECTIVE

mob
Move()
..()
src.client.eye=locate(src.x+1,src.y,src.z)


jesus, i've never used client.eye before, and i figured that out before i got to the bottom of this thread!

(i'll be flamed for this post, i'm sure, but there's your solution ^_^;;;)

~FM
In response to Forgetme
Forgetme wrote:
> client
> perspective=EYE_PERSPECTIVE
>
> mob
> Move()
> ..()
> src.client.eye=locate(src.x+1,src.y,src.z)
>

jesus, i've never used client.eye before, and i figured that out before i got to the bottom of this thread!

(i'll be flamed for this post, i'm sure, but there's your solution ^_^;;;)

~FM

Or, better yet...

client
perspective=EYE_PERSPECTIVE

mob
Move(New_Loc,Dir)
if(..(New_Loc,Dir))
src.client.eye=New_Loc
return ..(New_Loc,Dir)
Page: 1 2