Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to change enemy size, speed, etc depending on mobile screen size?

New Here ,
Dec 09, 2013 Dec 09, 2013

I have a game where enemies are spawned from a library at random. Their size and speed are set to work on specific dimensions. However, these specific standards won't work well on phones with small screens. Is there a way to change speed, size depending on a phone's dimensions?

TOPICS
ActionScript
568
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 09, 2013 Dec 09, 2013

sure.  you can assign those parameters based on the capabilities class screenResolutionX etc.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 10, 2013 Dec 10, 2013

Could you please explain more about these capabilities?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 10, 2013 Dec 10, 2013
LATEST

there's nothing to explain.  again, you can use:

if(Capabilities.screenResolutionX<whatever && Capabilitites.screenResolutionY<whateverelse){

// do whatever to deal with this screen size

} else if( etc ){

} etc

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines