Results 1 to 3 of 3
  1. #1
    TrollerCoaster's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    I am a fish
    Posts
    633
    Reputation
    61
    Thanks
    798

    Search n Destroy onPlayerConnect() ?

    This is something that has troubled me ever since I started GSC coding.

    Is there any way you can get a variable to carry over from round to round in SnD?

    And the problem is that onPlayerConnect re-executes each round, and I have a variable that needs to initialize for all players ONLY when they connect, but onPlayerConnect is always resetting it.

    Is there any way to fix this? If I have to edit a different GSC file, then tell me which one. Thanks in return

    Also, don't say to create a separate variable, because it's actually _rank that re-executes and all variables are considered undefined when a new round starts.

  2. #2
    edub18's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Germany
    Posts
    146
    Reputation
    10
    Thanks
    12
    My Mood
    Bored
    Code:
    level.YourVar = "Value"
    I think this will be reset the next time you load a new map.

  3. #3
    mathieutje12's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Close to my PC
    Posts
    578
    Reputation
    14
    Thanks
    165
    My Mood
    Angelic
    Got the same problem with custom killstreak they all disapear after each round.