Announcement

Collapse
No announcement yet.

How to Stream Levels in Script

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

    How to Stream Levels in Script

    I've used the following line for trying to perform Level Streaming via UnrealScript:
    Code:
    ClientUpdateLevelStreamingStatus( 'levelName', true, true, false );
    It works perfectly only if the level's name is already added as a sub-level in the Persistent level, in the Editor. Removing the name from the editor doesn't allow dynamic streaming of levels anymore.

    Is there any way to dynamically stream a new level through unreal script alone?

    #2
    Could someone please give some hints on how to stream an arbitrarily chosen level into the persistent level entirely through script?

    Thanks

    Comment


      #3
      http://udn.epicgames.com/Three/LevelStreamingHowTo.html

      Comment


        #4
        Yes, I knew about that type of streaming, but it requires you to set the sub-levels in the editor.

        Is there a way to do it entirely through script, without having to touch the editor?

        Comment


          #5
          I figured out how to do it. This is the way, in case someone else wants to do the same:
          Code:
          var name mapName;
          
          PlayerOwner.ClientPrepareMapChange( mapName, false, true);
          PlayerOwner.ClientCommitMapChange();
          where PlayerOwner is the PlayerController. The mapName is variable - so you can stream in any level into the persistent one without unloading the current level.

          The only issue with this is that the whole map brightens up the moment the new map is streamed in. Does anyone have an idea why that's happening?

          The overall brightness increases even though the map that was streamed in contains No lights of its own.

          Comment


            #6
            The increase in overall brightness is understandable when I load default maps like Example map, or GDC demo into my own map, as they have their own lights. That also causes the 'Lighting needs to be rebuilt' message to appear, which is also understandable.

            But when I load my own sub-level which consists of nothing more than 1 skeletal mesh actor and some kismet stuff, then also the whole level brightens up in the same way as it brightens up while loading default maps. The lighting needs to be rebuilt message does not come however.

            Is there anyway to stop the map from brightening up on streaming a dynamic level which contains no lights of its own?

            Thanks

            Comment

            Working...
            X