How to define current aspect ratio (scripting)

This forum is meant for people to share their knowledge by writing their own tutorials for Adventure Maker.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

How to define current aspect ratio (scripting)

Postby Lyberodoggy » Wed Dec 31, 2008 10:00 am

Well, I now have a 16:9 monitor, so I thought this might be usefull... You might want to know the aspect ratio of your user.

So, you can use this script to define if it is 4:3, 16:9 or none of them:
Code: Select all
If GetDisplayResolutionX*3=GetDisplayResolutionY*4 Then
aspectratio = "4:3"
else if GetDisplayResolutionX*9=GetDisplayResolutionY*16 Then
aspectratio = "16:9"
else
aspectratio = "unknown"
end if
end if


I know this might seem a little useless, but you need to know that 4:3 resolutions don't work well with widescreen monitors. So you can use this along with ChangeDisplayResolution to warn the user about the resolution problems.
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby MRM2811 » Wed Dec 31, 2008 1:19 pm

Lybero,

Where do you get all your wonderful ideas from?

:)
User avatar
MRM2811
Frequent Poster
 
Posts: 118
Joined: Mon Dec 29, 2008 10:55 am

Postby Lyberodoggy » Wed Dec 31, 2008 1:53 pm

Just seeing the help files gives me ideas every now and then... You know like: "What could that be used for? :idea:
User avatar
Lyberodoggy
Administrator
 
Posts: 2519
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens


Return to Post Your Own Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron