Question about using SetOwner on MapSpawn

Discussion in 'Mapping Questions & Discussion' started by sweitx, Jan 30, 2010.

  1. sweitx

    sweitx L1: Registered

    Messages:
    7
    Positive Ratings:
    0
    Hi, I'm pretty new at mapping so if the following question is moronic, I apologize.
    I'm trying to create a 6 CP Cyclical Capture Point map. But I'm having problem initializing the cap-point/spawnrooms.

    I have a current setup of a logic_auto, which OnMapSpawn calls a logic_relay that executes the following OnTrigger.

    "cp_Seg1_prop,Skin,3,0,-1"
    "cp_Seg1,SetOwner,3,0,-1"

    "trigger_teleport_Seg1,Disable,,0,-1"
    "filter_Seg1_inactiveteam,SetTeam,3,0,-1"
    "filter_Seg1_activeteam,SetTeam,3,0,-1"

    "player_Seg1_spawn,SetTeam,3,0,-1"

    "func_respawnroom_Seg1,Enable,,0,-1"
    "func_respawnroom_Seg1,SetTeam,3,0,-1"

    "sign_Seg1_resupply,Skin,4,0,-1"
    "sign_Seg1_exit,Skin,8,0,-1"


    In short, the goal was to give ownership of a capture point to a team (chosen at random) during MapSpawn. But the problem is that for some reason, the above doesn't change the ownership of the CP. I can't use the set owner to random at start since each team needs to have 3 CP in consecutive.

    Any help is appreciated.

    EDIT:
    By the way, the spawn room did get setup correctly except the first spawn frequently spawns in the wrong room (blue spawn in red, and vice versa). Subsequent respawn always gets placed in the right room.
     
    Last edited: Jan 30, 2010
  2. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    Control point will ignore any SetOwner inputs during the period from round end, through humiliation, into the next round, up until the 5 second "lockup" delay is over. (When you can start walking)
    There is no way around it other than delaying the inputs by 5.1 seconds, which won't really help you here.

    About the spawns, that's another pretty unavoidable thing. The players are going to spawn in at the default spawns before any inputs are fired, so you won't be able to use logic to determine initial spawn. You would have to put a teleport in the default spawn location that sends them wherever is chosen.
     
    • Thanks Thanks x 1
  3. megawac

    megawac L4: Comfortable Member

    Messages:
    180
    Positive Ratings:
    29
    For the changing the spawns, depending on map layout, it might be better to simply enable/disable doors to decide where players can go.
     
  4. sweitx

    sweitx L1: Registered

    Messages:
    7
    Positive Ratings:
    0
    Ah, thanks for the clarification.

    Well, I was/am trying to make a circular 6-cp cyclical capture point type map. And I've yet figure out a way to setup spawn such that both side's spawns are balanced (well, I had an layout in mind that is "relatively" balanced, but the arrangement is... convoluted).
     
  5. SPHinx

    SPHinx L2: Junior Member

    Messages:
    81
    Positive Ratings:
    24
    Do you know if this restriction can be overcome through a SourceMod script? Or if not SetOwner, what about changing the default owner?
     
  6. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,767
    Positive Ratings:
    5,508
    I've never delved into SourceMod code to know if it could or not.
     
  7. SPHinx

    SPHinx L2: Junior Member

    Messages:
    81
    Positive Ratings:
    24
    I have it on the authority of a couple of people from Allied Modders forum that this can be done (albeit not easily) with Sourcemod.