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 11-09-2001, 09:29 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
screen size

can someone show me how to check the players screen size so my NPC's can adjust if it is changed ...
Reply With Quote
  #2  
Old 11-09-2001, 12:27 PM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
The built-in variables "screenwidth" and "screenheight" hold the value's of the width and height of the screen.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #3  
Old 11-09-2001, 12:33 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
therefore:
if(screenwidth=#) {
showimg 501, .....;
}
would work?
Reply With Quote
  #4  
Old 11-09-2001, 12:36 PM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Yes........ But I wouldn't show an image if the screen equaled a certain size. If people play in Windowed mode, the size can really be anything......
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #5  
Old 11-09-2001, 12:36 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Quote:
Originally posted by BocoC
Yes........ But I wouldn't show an image if the screen equaled a certain size. If people play in Windowed mode, the size can really be anything......
ok and thanx ....
Reply With Quote
  #6  
Old 11-09-2001, 12:42 PM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Welcome ^_^ People normally use screenwidth and screenheight to place custom status bars on screen. Like:
NPC Code:

if (timeout) {
showimg 1000,myhpbar.gif,screenwidth*0.85,screenheight*0.1 ;
changeimgpart 1000,0,0,int(playerhearts/playerfullhearts),10;
timeout=0.05;
}

__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #7  
Old 11-09-2001, 12:47 PM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Quote:
Originally posted by BocoC
Welcome ^_^ People normally use screenwidth and screenheight to place custom status bars on screen. Like:
NPC Code:

if (timeout) {
showimg 1000,myhpbar.gif,screenwidth*0.85,screenheight*0.1 ;
changeimgpart 1000,0,0,int(playerhearts/playerfullhearts),10;
timeout=0.05;
}

it would look better like this

NPC Code:

if (timeout) {
showimg 1000,myhpbar.gif,screenwidth-150,50;
changeimgpart 1000,0,0,int(playerhearts/playerfullhearts),10;
timeout=0.05;
}



so then it is always constant on were it is on the screen (so it doesn't get moved if you get what I mean)
__________________
Thanks,
-KJL
Reply With Quote
  #8  
Old 11-09-2001, 01:07 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
thnx you both !
and status bars are what they were for ...
Reply With Quote
  #9  
Old 11-09-2001, 02:52 PM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Quote:
Originally posted by nyghtGT
thnx you both !
and status bars are what they were for ...
mainly...

well also things like menus and stuff can use it...

if you want to base something off the center of the screen or like move when you move the screen size then its good to use that...
__________________
Thanks,
-KJL
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 06:55 PM.


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