Results 1 to 12 of 12
  1. #1
    MSgt. Shooter Person
    Join Date
    Jun 2011
    Posts
    133

    Default Multiple Player Start Points

    Is there anyway to have the player start at different sections of the map. This is a single player game, and each time you restart, i want the player to "spawn" somewhere new on the map.

  2. #2

    Default

    Spawn somewhere else such as a check point system or just some random destination?

  3. #3
    MSgt. Shooter Person
    Join Date
    Jun 2011
    Posts
    133

    Default

    Not so much a random place, Its going to be like a maze, but the player starts in the same room, its just located in different places. So i guess random destinations. Imagine if you woke up, in your room, but stepped out the door and were somewhere else. then you fall asleep/die/whatever then wake up in your room, but step out and you are somewhere else again.

  4. #4

    Default

    Just so I get your idea more clear, I start in my Safe/Spawn Room, and when i leave I enter this maze at Point A, drastic change in environment, either teleporting, set actor location rotation (takes a little work) or level streaming, I make my way through part of this maze and die. So now you want me to spawn in the Safe/Spawn Room again and when I leave, I am not taken back to Point A. Correct so far?

    If so

    Do you want the player to be brought back to where they just died?

    Or Just dropped off some where in this maze, regardless of if the player has or hasn't been there yet?

  5. #5

    Default

    I'd say this is more like a different rooms with spawn points inside them
    it's just that all rooms are "cloned" so when player respawns he has no clue that he respawned in new room

  6. #6
    MSgt. Shooter Person
    Join Date
    Jun 2011
    Posts
    133

    Default

    Xenobite is correct. The spawn rooms will all be the same, it just when you step out the door, it will be a different "hall".

    Like if you woke up in your room, opened your door and ended up at the office. the next morining you wake up in your room, opened your door, and ended up at your mother in laws house.......

  7. #7

    Default

    Well sounds like I don't really want to leave the room then haha.

    So if the room you start off in is closed off, as in you can't see anything out side of it, utilizing level streaming would probably be your best bet. You would set up your starting room at the center location, and then design several sublevels with different mazes, in which could be swapped out each time the player is re spawned. Depending on how large your mazes are you may want to break them up into a couple sublevels, and load them in as needed.


    A second option, and will take a little bit more work is to use a teleport system, where you have your starting room and as the player passes through the door they are transported to one of your set up mazes in the level or location in the maze. You would use a switch or random from player spawned to activate which location you will be teleported to.

    Right now I have check point system/testing setup where i set up 2 int variables (CurrentLevel and LastCheckPoint) in which have switches looking at them to see what the value is, this allows me to quickly choose where in my game my player will start (moved to) and what levels are being streamed in.


    Hope this helps you guys out

  8. #8
    MSgt. Shooter Person
    Join Date
    Jun 2011
    Posts
    133

    Default

    Sounds awesome. I actually ran into some issues with my project so it kinda went back to the drawing board. I will be using a check point system to, but i do like your ideas as far as using level streaming. By assigning a random int and a switch, the everytime the player got to the door, it would stream a certain room would work out well. Thanks.

    Do you have any idea how level streaming works. Do i start building a central level, save it as the persisitant, then add to that and change the levels tab? I've been reading up on this as much as possible and it doesnt seem to make sense how i can build 2-3 seperate levels, and then make them flow together.

  9. #9

    Default

    When using Level streaming you’ll need one Persistent Level, and then how many ever sub levels. Too become more familiar with how it works I would create a test map.

    Start out with creating a new level (probably a blank one from the template choice if you're using June or later).

    In that level create a BSP (1024x1024x32 will be fine) and a 2nd BSP (256x256x32) touching one of the sides of the larger one.
    Add in a player start, a point light and 1 trigger (uncheck hidden in the triggers properties under display)


    Save the map naming it YourMapName_P.udk (P being persistent)
    Then in go to your content browser and select the Levels Tab.


    Click Level in the top left hand corner and select “New Level..”
    This will prompt the Windows Explore window to open. Name your map YourMapName_S1 and click save. (I tend to keep the first part of the level name the same for all sub levels and change the end, but you can do what ever works for you to be able to quickly identify what the map is.

    Once saved it will ask you how you would like to add the new sublevel to your Persitant Level, and your almost always going to want to choose Kismet.


    Now when you look in your Levels Tab you should see your Persistant Level and your newly created Level.


    Notice how next to the persistent level it says “ - Current Level - “
    This means that if I add any content to the world space, it will be held inside the persistent level.
    To change which level you are currently in, the easiest way to switch is to double click on the level you want in the Levels Tab.


    Now with the added level set as the current level add in a connecting BSP and another light (give this light a different color)
    Once you’ve added these 2 items, make the persistent level your “current level” again, and open up Kismet.

    Now using you trigger, you’re going to stream the second level in using a “Touch Trigger” and “Stream Level” which is in Actions/Levels/Stream Level
    Selecting your Stream Level Node, type in your YourMapName_S1 into Level Stream section. (make sure everything is exactly the same as your levels name, or the node will keep the red X. If you type in a Level that is in your level list, it will turn to a green Check.


    Now that it’s all set up, build lighting and play. You’ll see that when you first spawn, you will not be able to see the second level.


    Once you touch the trigger, it will pop in.



    Keep in mind it is being loaded, so if it is a large level with lots of content, its going to cause your level to choke up a bit, so try and be concious of how larger your levels are getting. You can always break your level down into several small sublevels, and load them as needed.

    Hope this helps, i kind of just slapped this together. If you have any other questions let me know, I'll try and get back to you later this week, in the middle of crunch for beta right now.
    Last edited by nbullard; 08-13-2011 at 04:29 AM.

  10. #10
    MSgt. Shooter Person
    Join Date
    Jan 2011
    Posts
    38

    Default

    I was just looking for that haha! thanks!

  11. #11
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    211

    Default

    nbullard, this helps me alot, thank you!

  12. #12

    Default

    No problem, glad I could pass on some useful info.

    One other thing I didn't mention is the use of named variables.
    Any named variable created in your Persistent level becomes a "Global Variable" meaning that it can be referenced in any sub level, and you'll get the green check mark.

    So create an int variable and type in "Test" into its property for Var Name.

    If you then create a "Named Variable" (hold 'N' and click left click in kismet)
    and also type in "Test" into it's Var Name, you'll see a green check replace the red X. You can copy your Name Variable and place it into your sublevel and it will still have a green Check.

    If you had the original INT variable in your sublevel you'll find it is contained to that level only.You can try coping the named variable and pasting into the persistent level but you'll see that it gets the red X again.

    When I'm done with my current project I'll have put up a more polished tutorial for this.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.