Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-05-2012, 06:38 AM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
Zoom adjusted by screensize

My goal: Have a constant view area around player no matter the size of the screen.

1st Attempt: I made an Img appear that's height and width was set determined by the screenwidth/screenheight.

Problem: couldn't see chat bar..and the black is ugly

2nd Attemp:
PHP Code:
function onTimeOut() {
 
setTimer(0.05);
 
this.controlWidth 600;
 
this.controlHeight 550;
 
with(GraalControl){
  
x=screenwidth/2;
  
y=screenheight/2;
  
width=thiso.controlWidth;
  
height=thiso.controlHeight;
 } 
Problem: It wouldn't center right, had to restart client before getting on another server to reset the black border, and once again, black is ugly...

Solution IDEASo I had this idea. A function that zooms everything determined on the screen size. Of what I heard There are some commands like camerabounds and camerasize but they are totally undocumented.

Thoughts?
Reply With Quote
  #2  
Old 12-05-2012, 06:50 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
v6 has canvas zooming but it's not great(a lot of visual bugs) so your options are pretty slim. What you can do is resize GraalControl and try adding ChatBar to GUIContainer, which should make it visible all the time. Then if the black is ugly try filling it with some graphics like the ol' Super Gameboy(since gameboy resolution didn't match the output resolution of the SNES):


Be very careful tinkering around with default controls. I mean, you're not going to say... crash a client but they're not scripted with being tinkered in mind. You'll have to account for the various things that can throw it off and mess everything up, like a new GUI being added to GUIContainer or such and not being accounted for on your end.
Reply With Quote
  #3  
Old 12-05-2012, 07:24 AM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
Quote:
v6 has canvas zooming but it's not great(a lot of visual bugs)
How do you set the canvas zooming?
Reply With Quote
  #4  
Old 12-05-2012, 07:52 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
I found out player.zoomfactor does zoom in a way, but makes an ugly grid.
Soooo frustrated on find a working solution
Reply With Quote
  #5  
Old 12-05-2012, 08:12 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by greggiles View Post
I found out player.zoomfactor does zoom in a way, but makes an ugly grid.
Well I told you it had a lot of visual glitches...
Reply With Quote
  #6  
Old 12-08-2012, 06:58 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Couldn't you just stretch the GraalControl GUI?
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #7  
Old 12-08-2012, 02:30 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Gunderak View Post
Couldn't you just stretch the GraalControl GUI?
nope, weird things happen when you manipulate GraalControl's position, let alone any more complicated transformations.
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:32 PM.


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