Announcement

Collapse
No announcement yet.

[HELP] Level Completion System

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [UDK] [HELP] Level Completion System

    Hello Guys!!!

    I just want to add a simple "level progression system" on my game. My design idea for my game, is to let the player play the same level many times, each time he can accomplish a specific achievement, like kill all enemies with a headshot, kill all enemies with a knife, kill enemies without being spotted, and so on.

    I am organizing my game into missions, each mission the player plays to accomplish these achievements, and because this I plan to let the player play each mission, each level at any time, even the campaign missions. I mean, everything will be unlocked for the player play (as I don't like whenever the player gets stuck, and I plan to make my game HARD, Dark Souls like).

    However, for allowing the player to feel some feeling of accomplishment, I want that whenever the player completes a mission, the thumbnail of this mission (map) changes to another image on which will have kinda badget saying "Mission Accomplished".

    My idea, is to have for each map kinda global boolean variable (like mission1complete, mission2complete), and set it to true whenever the player completes the mission/map (all gameplay is done in kismet), so after setting this variable to true, it would have to be saved in a file, so whenever the player starts the game, the UDKFrontEnd will check this variable status from the file (to which was saved the variable) and then change the map thumbnail.

    How can I do this? I am using default UDK Scaleform HUD and Menus.

    Cheers!
    https://sites.google.com/view/udkultimate/


    #2
    you need some simplified form of savegame system. search around for the udn gems savegame which is based on basicsaveobject
    Follow me on Twitter!
    Developer of Elium - Prison Escape
    Local Image-Based Lighting for UE4

    Comment


      #3
      Originally posted by Chosker View Post
      you need some simplified form of savegame system. search around for the udn gems savegame which is based on basicsaveobject
      Hello my friend, yes, I have been digging arround, and found that: https://docs.unrealengine.com/udk/Th...ee%20as%20JSon

      It seems that kismet variables can be saved to a JSON file.

      Thanks, I will try it and if i have some doubts, or be stuck, I will post here. My only concern is that I don't know if a JSON file can be saved to the PS3/Xbox360 HDD.

      Cheers!
      https://sites.google.com/view/udkultimate/

      Comment


        #4
        For saving I used this a lot.
        http://web.archive.org/web/201605041...mateSaveSystem

        But lately have been using this as one:
        https://forums.unrealengine.com/lega...ve-load-kismet

        Its the most simple one you can get for kismet.

        Comment


          #5
          Originally posted by O_and_N View Post
          For saving I used this a lot.
          http://web.archive.org/web/201605041...mateSaveSystem

          But lately have been using this as one:
          https://forums.unrealengine.com/lega...ve-load-kismet

          Its the most simple one you can get for kismet.
          WOW mate!!! Thanks!

          I remember this kismet save system, yeah. This is what I want, everything on kismet. As this does not rely on an external dll, it might work on consoles! I will just have to later take a look on how to read kismet variables in Unreal Script, so my GFXLauncher Class, which reads the thumbnail image, make it read the level completed var, and load the custom thumbnail for the map.
          Last edited by NIDAL NIJM GAMES; 01-13-2020, 03:00 PM.
          https://sites.google.com/view/udkultimate/

          Comment


            #6
            If you manage to upgrade it, please share.Im not sure, but i think strings were not working or not implemented?

            Comment


              #7
              Long story short, kismet, Kismet global event triggers you can make a campaign of it, I think.

              Look there is a function call, to call a event in kismet, I don't remember how. Google it.

              Like ok if kismet event pepitu triggers level completes. or bHasGotTheMagicalstick = true; the magical stick would be a kismet variable.


              On event pipitu() would be something like you kill an enemy, then the event kismet pepituKilled() would be called and or bool of kismet set to true or level complete, we don't have event dispatchers here like in UE4, but who cares they won't event run in packaged builds for some reason.....

              Heard about archetypes? Set an enemy to bIsPepitu to true and go for it on the level, do you know what im saying?

              P.S read the thread and it's about save system, config files maaaaaaaaaan.
              Some cool unreal projects you may like!


              Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

              Download the demo Download the demo
              external link Dropbox DropBox

              Become a c++ Professional now C++ Networking Tutorial

              Comment


                #8
                Originally posted by Neongho View Post
                Long story short, kismet, Kismet global event triggers you can make a campaign of it, I think.

                Look there is a function call, to call a event in kismet, I don't remember how. Google it.

                Like ok if kismet event pepitu triggers level completes. or bHasGotTheMagicalstick = true; the magical stick would be a kismet variable.


                On event pipitu() would be something like you kill an enemy, then the event kismet pepituKilled() would be called and or bool of kismet set to true or level complete, we don't have event dispatchers here like in UE4, but who cares they won't event run in packaged builds for some reason.....

                Heard about archetypes? Set an enemy to bIsPepitu to true and go for it on the level, do you know what im saying?

                P.S read the thread and it's about save system, config files maaaaaaaaaan.
                Thanks man for the ideas. Yeah, I will go for kismet save system, because config files save method will work only on PC, but I need it to work on PS3 and Xbox360. I am afraid ini files can't be changed in console build of UDK. Anyway, I will try, test, and showcase it here.
                https://sites.google.com/view/udkultimate/

                Comment


                  #9
                  aha….. thanks for the info my friend.
                  Some cool unreal projects you may like!


                  Developer of GOTA - Survivalism Gladiatorial game Buy the game google gladiators of the arena steam https://store.steampowered.com/app/7..._Of_The_Arena/

                  Download the demo Download the demo
                  external link Dropbox DropBox

                  Become a c++ Professional now C++ Networking Tutorial

                  Comment


                    #10
                    Hello guys. I've been digging arround and already have a rough idea of how to make this custom level completion system. It's very easy, and simple. The first step is create (use) a simple kismet save system to save variables on map to a file (https://forums.unrealengine.com/lega...ve-load-kismet). There will be just one variable for each map (like mission1completed = true) that needs to be saved.

                    I already found in GFxUDKFrontEnd_MapSelect.uc the code that loads each map thumbnail. I just want after the player completes a level, its thumbnail changes to another thumbnail with a label "Completed".

                    I just need now in this class, GFxUDKFrontEnd_MapSelect.uc, on this piece of code, add a code to read the variable value from the saved file (the variable will be saved to a file):

                    Code:
                                // If a preview image exists, use that.
                                if (LocalMapList[i].PreviewImageMarkup != "")
                                {
                                    TempObj.SetString("image", "img://" $ LocalMapList[i].PreviewImageMarkup);
                                }
                    How can I do this? (read variable from a file)
                    Last edited by NIDAL NIJM GAMES; 02-10-2020, 01:02 PM.
                    https://sites.google.com/view/udkultimate/

                    Comment


                      #11
                      Not sure, but don't worry as im sure you will get a more competent answer than me.
                      If its all kismet, i would use this modified version of UI scenes
                      http://www.hourences.com/tutorials-u...met-interface/
                      And you can easily select variables when using it to make use of the save system.Its just a alternative.

                      Comment


                        #12
                        Originally posted by O_and_N View Post
                        Not sure, but don't worry as im sure you will get a more competent answer than me.
                        If its all kismet, i would use this modified version of UI scenes
                        http://www.hourences.com/tutorials-u...met-interface/
                        And you can easily select variables when using it to make use of the save system.Its just a alternative.
                        Thanks bro for the tip. But as I am cooking the game for consoles, I think this would not work because it uses the mouse cursor as interface, and the UE3 Interface System for consoles does not use mouse. There is a unreal script function to detect the consoles buttons pressed, and it uses scaleform as a way to focus on the button so the player can press and interact with that.

                        For example, this is a Custom Scaleform Class I created for the mission briefing menu with two options Start Mission, Abort Mission (I did modify the Pause Menu Class):

                        Code:
                        /**********************************************************************
                        
                        Copyright   :   (c) 2006-2007 Scaleform Corp. All Rights Reserved.
                        
                        Portions of the integration code is from Epic Games as identified by Perforce annotations.
                        Copyright 2010 Epic Games, Inc. All rights reserved.
                        
                        Licensees may use this file in accordance with the valid Scaleform
                        Commercial License Agreement provided with the software.
                        
                        This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING 
                        THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR ANY PURPOSE.
                        
                        **********************************************************************/
                        
                        /**
                         * Pause menu implementation.
                         * Related Flash content:   ut3_pausemenu.fla
                         * 
                         * 
                         */
                        class GFxUI_MissionStart extends UTGFxTweenableMoviePlayer;
                        
                        var GFxObject RootMC, PauseMC, OverlayMC, Btn_Resume_Wrapper, Btn_Exit_Wrapper;
                        var GFxClikWidget Btn_ResumeMC, Btn_ExitMC;
                        
                        // Localized strings to use as button labels
                        var localized string ResumeString, ExitString;
                        
                        function bool Start(optional bool StartPaused = false)
                        {
                            super.Start();
                            Advance(0);
                        
                            RootMC = GetVariableObject("_root");
                            PauseMC = RootMC.GetObject("pausemenu");    
                        
                            Btn_Resume_Wrapper = PauseMC.GetObject("resume");
                            Btn_Exit_Wrapper = PauseMC.GetObject("exit");
                        
                            Btn_ResumeMC = GFxClikWidget(Btn_Resume_Wrapper.GetObject("btn", class'GFxClikWidget'));
                            Btn_ExitMC = GFxClikWidget(Btn_Exit_Wrapper.GetObject("btn", class'GFxClikWidget'));
                        
                            Btn_ExitMC.SetString("label", "ABORT MISSION");
                            Btn_ResumeMC.SetString("label", "START MISSION");
                        
                            Btn_ExitMC.AddEventListener('CLIK_press', OnPressExitButton);
                            Btn_ResumeMC.AddEventListener('CLIK_press', OnPressResumeButton);
                        
                            //these are the XBOX360 confirmation buttons
                            AddCaptureKey('XboxTypeS_A');
                            AddCaptureKey('XboxTypeS_Start');
                        
                            //these are the PS3 confirmation buttons
                            AddCaptureKey('PS3_X');
                            AddCaptureKey('Generic_A');
                        
                            AddCaptureKey('PS3_Start');
                            AddCaptureKey('Generic_Start');
                        
                            //these are the PC confirmation buttons
                            AddCaptureKey('Enter');
                        
                            return TRUE;
                        }
                        
                        function OnPressResumeButton(GFxClikWidget.EventData ev)
                        {
                            //PlayCloseAnimation();
                            //this will make the mission menu start the game directly instad of playing close animation
                            UTHUDBase(GetPC().MyHUD).CompleteMissionStartClose();
                        }
                        
                        function OnPressExitButton(GFxClikWidget.EventData ev)
                        {
                            UTPlayerController(GetPC()).QuitToMainMenu();    
                        }
                        
                        function PlayOpenAnimation()
                        {
                            PauseMC.GotoAndPlay("open");
                        }
                        
                        function PlayCloseAnimation()
                        {
                            PauseMC.GotoAndPlay("close");
                        }
                        
                        function OnPlayAnimationComplete()
                        {
                            //
                        }
                        
                        function OnCloseAnimationComplete()
                        {
                            UTHUDBase(GetPC().MyHUD).CompleteMissionStartClose();
                        }
                        
                        /*
                            Launch a console command using the PlayerOwner.
                            Will fail if PlayerOwner is undefined.
                        */
                        final function UT_ConsoleCommand(string Cmd, optional bool bWriteToLog)
                        {
                            GetPC().Player.Actor.ConsoleCommand(Cmd, bWriteToLog);
                        }
                        
                        defaultproperties
                        {
                        
                            // Sound Mapping
                            SoundThemes(0)=(ThemeName=default,Theme=UISoundTheme'UDKFrontEnd.Sound.SoundTheme')
                        
                            bEnableGammaCorrection=FALSE
                            bPauseGameWhileActive=TRUE
                            bCaptureInput=true
                        }
                        Anyway, I will keep crushing my head on my desk until the solution comes to my mind
                        https://sites.google.com/view/udkultimate/

                        Comment

                        Working...
                        X