1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

UE3 - UT3 Force Team Spawns in TDM?

Discussion in 'Mapping' started by inferyes, Sep 2, 2010.

  1. inferyes

    inferyes Spaced In

    Joined:
    Aug 16, 2009
    Messages:
    504
    Likes Received:
    0
    I have a map that has red and blue bases and I want players to spawn at there own bases in TDM. I used red and blue spawn points but they still spawn at random bases. Is there a way to fix this? I tried kismet but I couldn't find a way to do it that way.
     
  2. Wormbo

    Wormbo Administrator Staff Member

    Joined:
    Jun 4, 2001
    Messages:
    5,913
    Likes Received:
    36
    This will need UnrealScript, but shouldn't you really be creating a CTF or e.g. Jailbreak map if you want to have bases?

    Anyway, try compiling the following code and placing it in the map:
    Code:
    class ForceTeamSpawnArea extends Info placeable;
    
    function PreBeginPlay()
    {
      if (UTTeamGame(WorldInfo.Game) != None)
        UTTeamGame(WorldInfo.Game).bSpawnInTeamArea = True;
    }
    
     
  3. Narayana

    Narayana New Member

    Joined:
    Jun 16, 2009
    Messages:
    19
    Likes Received:
    0
    A way to implement this in kismet is to check the team upon spawn and instantly teleport the pawn to the desired playerstart(s) or pathnode(s). You can still still disable this for DM by checking the game when the level begins and disabling playerspawned events.
     
  4. Pookycs09

    Pookycs09 New Member

    Joined:
    Jun 14, 2009
    Messages:
    24
    Likes Received:
    0
    How would you compile and place it in a map? Do you have a link to a tutorial? I googled it and but all I get are tutorials on mutators.
     
  5. Wormbo

    Wormbo Administrator Staff Member

    Joined:
    Jun 4, 2001
    Messages:
    5,913
    Likes Received:
    36
    Compiling is the same for all kinds of classes.
     
  6. Pookycs09

    Pookycs09 New Member

    Joined:
    Jun 14, 2009
    Messages:
    24
    Likes Received:
    0
    Oh ok. So after I compile it how do I place it in the map?
     
  7. Wormbo

    Wormbo Administrator Staff Member

    Joined:
    Jun 4, 2001
    Messages:
    5,913
    Likes Received:
    36
    Same as with all custom actors: load package in actor browser, pick class from tree and put in the level as usual.
     
  8. Pookycs09

    Pookycs09 New Member

    Joined:
    Jun 14, 2009
    Messages:
    24
    Likes Received:
    0
    Cool, thanks for the help man.
     
  9. inferyes

    inferyes Spaced In

    Joined:
    Aug 16, 2009
    Messages:
    504
    Likes Received:
    0
    This map is also a VCTF map but I want to have a TDM version. Also, there only seems to be a "Same Team" condition which checks to see if 2 players are on the same team. I don't see a condition to check if a player is on a specific team.

    I'd like to try and avoid using a uscript for these maps if possible.
     
  10. Pookycs09

    Pookycs09 New Member

    Joined:
    Jun 14, 2009
    Messages:
    24
    Likes Received:
    0
    Without using uscript this is the best I could think of:
    [​IMG]

    This is just an example made for one player. The player spawned event needs to have a max trigger count set to 0.

    The problem with doing it this way is that you need to place the fake spawns points up above the ground or continually disable them when someone walks over them or else other players could get telefragged. Also their needs to be some sort of fail safe just in case a player doesn't teleport.
     
  11. inferyes

    inferyes Spaced In

    Joined:
    Aug 16, 2009
    Messages:
    504
    Likes Received:
    0
    I didn't know there was a "Get Team Number" node. Thanks man. I'll set it up so it will teleport the player to a random spawn point at the base if the spawn in the wrong place.
     
  12. inferyes

    inferyes Spaced In

    Joined:
    Aug 16, 2009
    Messages:
    504
    Likes Received:
    0
    I tried the kismet thing and it had some problems so I went ahead and compiled wormbos script. It works perfectly now. Thanks man.

    :)
     
  13. Narayana

    Narayana New Member

    Joined:
    Jun 16, 2009
    Messages:
    19
    Likes Received:
    0
    Script is always more efficient and less error-prone for things like this...
     
  14. inferyes

    inferyes Spaced In

    Joined:
    Aug 16, 2009
    Messages:
    504
    Likes Received:
    0
    Yeah but it requires more [​IMG]
     
  15. Narayana

    Narayana New Member

    Joined:
    Jun 16, 2009
    Messages:
    19
    Likes Received:
    0
    Unless you are referring to end-user/server-admin setup, I disagree. A reliable Kismet setup (using stock kismet sequences only) seems to require a bit more effort to produce for this function. Example of a Kismet setup (working with stock kismet sequences) with 8 TDM spawns / 8 DM spawns:

    http://www.filefront.com/17264253/DM-dividespawns.ut3

    Versus a few lines of code this fancy kismet setup is not worth the effort. Trigger volumes are used instead of player spawned in order to have the failsafe. (looping toggled volumes at the real spawns)
     
  16. inferyes

    inferyes Spaced In

    Joined:
    Aug 16, 2009
    Messages:
    504
    Likes Received:
    0
    Heh, I guess. Setting up my kismet tree only took like 15 minutes but the first spawn in the match was wrong usually and you could tell it was teleporting players so I just compiled the script and added it.

    The only effort in this is remembering to include the script with the final version of the maps.
     

Share This Page