Announcement

Collapse
No announcement yet.

Runner Game help

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

    Runner Game help

    Based on the tutorial from this link, I started creating my own Runner Game.
    There's something I want to change in my version. I want my player to move in 3 "lanes".
    Instead of running all the way from, let's say, middle to right, I want to make it more instant. Like this.
    My question is, how the heck am I going to do it? I have literally no idea and my experience with unreal 4 and programming is almost basic.

    Thank you in advance and excuse me for my bad English.

    #2
    I haven't personally watched the tutorials so im not sure how it has currently been set up, but it should be as simple as "Set actor location" (or teleport) on the player character. One way which you can go about it would be to have an enum for the lane the player is currently in (To create the enum, Right click in the content browser > Blueprints > Enum and add rows for each lane) and using that to drive you lane switching locations. The select in the image below can determine what Y value for each of the lanes and you can plug your own values in there to meet your needs.

    Click image for larger version

Name:	LanesBlueprint.PNG
Views:	1
Size:	212.3 KB
ID:	1101135
    Attached Files
    CCG Toolkit | Mutliplayer Card Game Framework: On the Marketplace | Support Thread

    Point and Click Adventure Toolkit | Adventure Game Framework: On the Marketplace | Support Thread

    Comment


      #3
      I will test it and tell you the results. thanks a lot pal. yo uare a life saver!
      On another note, for my runner game to be working, I created "tiles" which are repeated in order to randomly generate the world.
      Thing is that 1 tile is the parent and the others its childs. Now when I add some collision boxes on the parents, the childs inherit them as well.
      Is there any way fom the child tiles to NOT inherit the collision boxes from the parent?

      Comment


        #4
        This can come down to how you have set up your parent actor and children, and it is difficult to know the cause of this behavior without some screens or knowledge on how it has been setup in the first place. If you post some screenshots of your setup it might help narrow down what you are seeing.
        Completely speculative though, if you adding children to the parent actor as well as collision components (all in the parent) then it would likely be considered the same actor in the end. So a workaround could be to not have the actors spawn as children and have a "Spawn manager" which handles all that logic and have the collision you want in each of the actors spawned rather then inheriting them from the parent. If you dont want your children to inherit anything from the parent, then its likely that you done want you parent to have that component in the first place, and have the children hold it themselves.
        CCG Toolkit | Mutliplayer Card Game Framework: On the Marketplace | Support Thread

        Point and Click Adventure Toolkit | Adventure Game Framework: On the Marketplace | Support Thread

        Comment


          #5
          Well, a temporary solution I found, was to disable the collision on the blocking volumes I didn't need in the child objects.
          I have 2 more questions now:
          1) I don't know how to create a "Return to Main Menu" button from my pause screen. Since "PauseMenu" is a different blueprint from "MainMenu", I can't just take a simple "Main Menu" reference and add it to the blueprint, can I?
          Here's the code for the Main Menu:
          Click image for larger version

Name:	ss+(2016-02-25+at+01.04.01).png
Views:	1
Size:	344.1 KB
ID:	1101184
          And here's for the Pause Menu:
          Click image for larger version

Name:	ss+(2016-02-25+at+01.02.49).png
Views:	1
Size:	222.9 KB
ID:	1101185
          2) I also wanted to inlude a "High Score" screen showing how many coins the player managed to collect before dying and save it locally. But I have no idea how to do that..

          Thank you for everything so far and excuse me for my bad english.

          Comment


            #6
            Im glad you found a solution

            Yes, the main menu should be as simple as loading into the menu level and creating/adding the menu widget to the screen through the reference. Or even just have it appear at the end of the game and destroy the pause menu through the "Remove from parent" node. Keep in mind where you are keeping the reference though, as going between levels destroys most, if not all objects within the game. A game Instance will however persist across levels, so you can use that to create and store references then you can just simply call those events when you need them.

            As for high scores, there are many tutorials online which can help you with setting up a high score screen and how to setup and save variables which could help you with this. Unfortunately it isn't a straight forward answer for a forums question, but the content is definitely out there
            CCG Toolkit | Mutliplayer Card Game Framework: On the Marketplace | Support Thread

            Point and Click Adventure Toolkit | Adventure Game Framework: On the Marketplace | Support Thread

            Comment


              #7
              Yeah, I managed to do the menu part as well. Now what remains is the highscore and some tutorials to spice things up a little. Adding power-ups etc. and varying the course a little more.

              Comment

              Working...
              X