Page 1 of 1

Hub system net support

Posted: Fri May 06, 2011 9:54 pm
by GreatEmerald
I've got a few notes from people about the hub system in Unreal Beta and others not working correctly in online games from the final, and I believe that this is why:

In single player, the player starts the hub level from a teleporter that led the player there. The player then goes to the first connected level and finishes it. Then he returns, again through a teleporter, but a different one. That leads to him stepping on a trigger that allows the player to continue to the next map and (usually) blocks the path back to the first connected level.

In a netgame, however, the player is spawned in the playerstart. He can then proceed to the first connected level, finish it and get back to the hub level. But the problem is that the server doesn't use the teleporter and spawns the player back in the playerstart - therefore the player has no way of pressing the trigger that allows him to proceed with the game and thus is stuck in a loop forever.

So, is there a way to get the system working? It would probably be ideal if the server could use the information from the teleporter to find the teleporter, see what it should trigger, then do it before starting the game. The trigger should also disable the first set of playerstarts and enable the second set. Then the players could spawn and continue playing the game. Is that achievable in any way?

Re: Hub system net support

Posted: Fri May 06, 2011 10:27 pm
by Bleeder91[NL]
Oeh oeh! Can i try?! :P If you're planning to edit the maps then select the black part below to view my suggestion!

With editing maps

At the end of the level, give a player an item that travels, then in the next level (or the previous in this case) add some kind of thing that checks all players for that specific item. If he has it, than trigger stuff, delete that item. Then it's just a matter of teleporting the first player that joined to the new starting point.


Without editing maps

A mutator that travels ofcourse. It check the first map for teleporters/actors/w.e and stores their event. Then in the next map, checks for actors with that tag and if there are, trigger em.

Ofcourse, if it sux or i completely missed your point then ignore it :D

Re: Hub system net support

Posted: Sat May 07, 2011 6:35 am
by GreatEmerald
Interesting suggestion about an item... Rather hacky, but it should do it.
A mutator wouldn't work like that, since there is no place it could store information about it and retain it after a server travel.

Re: Hub system net support

Posted: Sat May 07, 2011 10:54 am
by .:..:
What I used in my beta conversion was the URL line with a special teleporter and counter actor (this works offline/online):

Code: Select all

class GlobalCounter extends Triggers;

var() name MapEvents[8],PlayerStartTag[8];
var byte MapCountValue;

function PostBeginPlay()
{
      local PlayerStart PS;

      MapCountValue = FindLastMapVal();
      SetTimer(0.0001,false); // Wait one tick to ensure level has started up properly.

      if( PlayerStartTag[MapCountValue]!='' )
            foreach AllActors(Class'PlayerStart',PS)
            {
                  if( PS.Tag==PlayerStartTag[MapCountValue] )
                  {
                        PS.bEnabled = true;
                        PS.bCoopStart = true;
                        PS.bSinglePlayerStart = true;
                  }
                  else
                  {
                        PS.bEnabled = false;
                        PS.bCoopStart = false;
                        PS.bSinglePlayerStart = false;
                  }
            }
}
function Timer()
{
      local Actor A;

      if( MapEvents[MapCountValue]!='' )
            foreach AllActors(Class'Actor',A,MapEvents[MapCountValue])
                  A.Trigger(Self,None);
      Destroy();
}
final function byte FindLastMapVal()
{
      local string S;
      local int i;
      
      S = Level.GetLocalURL();
      i = InStr(Caps(S),"?LASTMAP=");
      if( i

Re: Hub system net support

Posted: Sat May 07, 2011 11:45 am
by GreatEmerald
Very interesting. But I still don't get it, what do InVal and OutVal mean in this case? Which are playerstart tags and which are events?