ID:141246
 
Code: Client.eye & Client.perspective = EYE_PERSPECTIVE problem.
turf
Clanskilltreeclick
Click()
client.eye = locate (443,163,2)
client.perspective = EYE_PERSPECTIVE

turf
Elementskilltreeclick
Click()
client.eye = locate (442,177,2)
client.perspective = EYE_PERSPECTIVE


Problem description: I try to when you click the invisible turf, your view will be changed to the coordinates located. But when i compile the files, it says client.eye and client.perspective are undefined vars, please help.

You're doing this in /turf/, you're not defining anything doing the proc, so it automatically uses 'src'.

'src.client' in a /turf/

I'll leave the rest to you >.>;
In response to Mysame
Mysame wrote:
You're doing this in /turf/, you're not defining anything doing the proc, so it automatically uses 'src'.

'src.client' in a /turf/

I'll leave the rest to you >.>;

Sorry, but could you please be more specific, because when i just do usr.loc = locate (1,1,1) it will work, but i want the player to stay at the same spot.
In response to Mitzzz
You seem to have a misconception of what usr and src are, or unaware of the difference between an object/class and it's instance.
You should read up on this and then try to figure it out on your own, since both are essential parts of programming in BYOND.
In response to Schnitzelnagler
Okay, so i missunderstood, but then, how do i make the view of the mob go to the coordinates given when they click a certain turf/obj?
In response to Mitzzz
The reason I did not provide a finished and fixed code snippet, but instead linked you to articles where you could learn about the source of your problem is rather simple.
You would learn nothing and stumble about the very same problem over and over again.

Do you not want to learn how to program?
It's your game that you want to create, so you should invest effort. And I can't help but think that reading those two articles isn't too much effort to take, but something you can't possibly have done within the few minutes you required to reply to my posting, so I take it that you did not even try.
In response to Mitzzz
Simple.. I'm giving you your final clue, and if you can't figure that one out, I give up hope on humanity once more. You even said the answer.

//Doesn't work:
client.eye = locate (443,163,2)

//Does work:
usr.loc = locate (1,1,1)

// What could possibly be the difference.. Hmzz..
In response to Mysame
The only problem is that when you use usr.locate, the mob will get teleported to that location, and i don't want that to happen.
In response to Mitzzz
*throws away hope in humanity*

Listen. I said it'll automaticly use "src" because you didn't specify (like in usr.locate() ) anyone doing the proc. Because you're doing this in /turf/, "src" will mean THE TURF. Turfs don't have clients, thus it errors.

You need to use 'usr.client.eye'. Tadaaa!