ID:173055
 
it be cool...if instead of when you use lazy eye = 7 and got to the edge of the screen with your mob, it just popped and re centered.....


Instead you could code it some how so that it smoothly scrolled to recenter your view........

I think you can code this i some how....


Could someone please tell me how it can be done?
You could do something that will constantly change your client eye back to you with a loop until your client eye is back to you. Or you can make an invisible object walk in a pace to you and set the eye to the object.
In response to Unknown Person
Unknown Person wrote:
You could do something that will constantly change your client eye back to you with a loop until your client eye is back to you. Or you can make an invisible object walk in a pace to you and set the eye to the object.


Thanks, Ill look into this loop, and invisible object stuff....
In response to Nave
Actually...i NEED HELP I DONT UNDERSTAND....
In response to Nave
Or you can make an invisible object walk in a pace to you and set the eye to the object.
It's not that hard. Create an invisible, nondense object at the same location as the player's mob. Set client_eye to it. Every time you move, check if the distance between that invisible object, and the player, is greater than a certain amount(eg 6). If so, have the invisble object walk_to the player's mob.
In response to Jon88
obj
invisblething
set client_eye = invisblething
if("src.invisiblething = 6tiles")
walk_to(PC)



cooleffect.dm:3:error:client_eye:undefined var
cooleffect.dm:3:error:invisblething:undefined var
cooleffect.dm:4:error:"src.invisiblething = 6tiles":value not allowed here
cooleffect.dm:5:error::empty type name (indentation error?)
cooleffect.dm:5:error:PC:value not allowed here


In response to Nave
Haha, wow, that's like:
game
New()
src.BeCool()
proc/BeCool()
docoolstuff()


Anyways, lemme try this...

mob/proc/adjustviewtick()
while(src)
var/needadjust = 0
if(src.client)
if(get_dist(src,src.client.eye)<1)
needadjust = 0
if(get_dist(src,src.client.eye)>6)
needadjust = 1
if(needadjust)
src.client.eye = get_step(src.client.eye,src)
sleep(2)
return


I think that should do it for you. Try it out by calling it for your player mobs and let me know if it works!