[ANDROID] Build Error – DIDDY2 and Building Module Errors.

About Monkey 2 Forums Monkey 2 Programming Help [ANDROID] Build Error – DIDDY2 and Building Module Errors.

This topic contains 5 replies, has 3 voices, and was last updated by  therevills 1 year, 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #11806

    Amon
    Participant

    I cannot get it to work with the current 1.108 version of MnkeyX2. Specifically, when trying to build anything for android, above, is the error. I’m trying to build for Android but also trying to rebuild the DIDDY2 module.

    Thanks.

    #11808

    abakobo
    Participant

    It looks like you had not been building modules for Android. You have to do it once before you Can build you app or build a third party module.

    #11811

    therevills
    Participant

    Amon, I recommend you dont build Diddy2 as a module just yet… just import the main Diddy2 file in your file:

    Here is a Diddy template:

    And have your folder structure as such:

    #11824

    Amon
    Participant

    Thank you. Both of you helped to get it working which I appreciate.

    Another error I am facing now is when I try to add my own screens. I wanted a Logo Screen so I created the class for it and extended the Screen Class. When I set it to start with the LOGO_SCREEN it spits an error stating that Screen has no member named LOGO_SCREEN.

    If you can help, mr revills, I would appreciate it….

    Thank you.

    #11833

    Amon
    Participant

    ok, with a bit of trial and error and reading the source for ‘Screen’, you have to do the following to add new screens that are not hardcoded in the Screen class.

    To add a new screen you must do the following In CreateScreen.

    If you want LOGO_SCREEN to be the first screen to start when your app runs you must modify ‘Start’ to:

    Start(GetScreen(“LOGO_SCREEN”))

    That’s all…

     

    🙂

    #11845

    therevills
    Participant

    Yep you got it! 🙂

    I’ve only created a few constants for the most common screens:

      Const EMPTY_SCREEN:String = “EmptyScreen”
      Const EXIT_SCREEN:String = “ExitScreen”
      Const GAME_SCREEN:String = “GameScreen”
      Const TITLE_SCREEN:String = “TitleScreen”
      Const OPTIONS_SCREEN:String = “OptionsScreen”
      Const GAME_OVER_SCREEN:String = “GameOverScreen”
      Const LEVEL_SELECT_SCREEN:String = “LevelSelectScreen”
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.