Scripting Question

SourFruitSourFruit Join Date: 2003-01-16 Member: 12347Members
<div class="IPBDescription">Exec script depending on map?</div> Is there a way to execute a certain script when a certain map is loading? Making a little communicationscript, and that would really help..

/SourFruit

Comments

  • FireStormFireStorm Join Date: 2002-11-06 Member: 7390Members
  • SourFruitSourFruit Join Date: 2003-01-16 Member: 12347Members
  • Brutus1Brutus1 Join Date: 2003-01-20 Member: 12514Members
    I'm almost certain that there is a way to do that in TFC, some scripts use it (i think), i'll ask around.

    As for a temporary solution, i would suggest using something like this in your main script (always loaded)

    Alias "bast" "exec bast.cfg"

    Then when the map switches to ns_bast, open your console and write "bast".
    and

    Alias "end-map" "unbindall; exec config.cfg"
    do that when the map changes

    and then use the command for a new map, just like in bast, just a diffrent filename/map.

    So basicly your config.cfg should have what it usualy has, plus the following:

    Alias "end-map" "unbindall; exec config.cfg"
    Alias "MAPNAME" "exec MAPNAME.cfg"

    If something is unclear, feel free to ask me.
  • svensven Join Date: 2003-01-15 Member: 12321Members
    in tfc you name the config map.cfg
    map being the variable. 2fort.cfg
  • BadmasterBadmaster Join Date: 2002-12-12 Member: 10707Members
    edited August 2011
    i lately included a map changer in my script... actually there r just the hivenames included... might include important locations as well...
    have a look @ it
    Greetz Badmaster
Sign In or Register to comment.