Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Graal V4 Main Forum (https://forums.graalonline.com/forums/forumdisplay.php?f=143)
-   -   Suggestion: setview (https://forums.graalonline.com/forums/showthread.php?t=63648)

Rick 01-22-2006 07:21 PM

Suggestion: setview
 
Similar to setfocus, only it sets the origin of the viewpoint to this x/y (instead of the player's x/y). If a setfocus is in effect, it would be relative to this as well.

And of course, resetview.

Would be handy if this gets added, I really need it! :)

Admins 01-22-2006 11:41 PM

Describe more please

ZeLpH_MyStiK 01-23-2006 02:23 AM

I think Rick means that the setview command would change the resetfocus coordinates. For example:
NPC Code:

//#CLIENTSIDE
function onCreated() {
setfocus(5,5); //would change the view to coordinates (5,5)
resetfocus(); // would change the view back to the player
setview(20,20); // would change resetfocus coordinates to (20,20)
setfocus(5,5); // change view to coordinates (5,5) again
resetfocus(); // this time it would change view to 20,20 as opposed to player coordinates
resetview(); // and resetview to change the coordinates setview() has set back to player coordinates.
}


Rick 01-23-2006 05:23 AM

Quote:

Originally Posted by Stefan
Describe more please

ZeLpH_MyStiK sort of gets it right.

I want to be able to move the player's view around (as if their player X/Y is moving) without actually moving the player.

Say the player is at 10,10 then I changed their coords to 50,50. Their view would center on 50,50.

What I want to do is have the player at 10,10 then be able to setview(50,50) and have the view center on 50,50 without actually moving the player.

Hopefully I'm making a little more sense now?

Admins 01-23-2006 03:58 PM

Since when is setfocus moving the player ?

Rick 01-23-2006 05:12 PM

Quote:

Originally Posted by Stefan
Since when is setfocus moving the player ?

It's not...?

I'm looking for a precise way of managing the view, setfocus doesn't seem to be that way.

Admins 01-27-2006 12:59 AM

Well the setfocus thing is compatible for different screen size. If you want a way to set the view origin then you would need to care about the window size though ?

Rick 01-27-2006 08:06 AM

Quote:

Originally Posted by Stefan
Well the setfocus thing is compatible for different screen size. If you want a way to set the view origin then you would need to care about the window size though ?

Yes that would be fine.


All times are GMT +2. The time now is 09:53 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.