problem with scripting and bots

Discussion in 'Team Fortress 2 Talk' started by adamspurgin, Apr 16, 2010.

  1. adamspurgin

    adamspurgin L1: Registered

    Messages:
    42
    Positive Ratings:
    1
    so, i have a rather large script (400+ lines) i am dealing with, and the bots just won't do what i say.

    Code:
    sv_cheats 1
    mp_teams_unbalance_limit 32
    sv_allow_wait_command 1
    bot -class sniper -team red -name 0
    bot -class sniper -team red -name 1
    bot -class sniper -team red -name 2
    bot -class sniper -team red -name 3
    bot -class sniper -team red -name 4
    bot -class sniper -team red -name 5...
    .
    .(more spawning commands here)
    .
    bot -class sniper -team red -name 26
    bot -class sniper -team red -name 27
    bot -class sniper -team red -name 28
    bot -class sniper -team red -name 29
    
    wait 60
    echo post-wait
    
    bot_teleport 0 -72 5860 -1987 0 0 0
    bot_teleport 1 -172 5860 -1987 0 0 0
    bot_teleport 2 -72 5760 -1987 0 0 0
    bot_teleport 3 -272 5660 -1987 0 0 0
    bot_teleport 4 -172 5660 -1987 0 0 0
    bot_teleport 5 -272 5760 -1987 0 0 0
    bot_teleport 6 -72 5660 -1987 0 0 0
    bot_teleport 7 -272 5860 -1987 0 0 0
    
    echo pre-wait
    wait 50
    echo post-wait
    
    bot_teleport 0 -92 5832 -1987 0 0 0
    bot_teleport 1 -192 5832 -1987 0 0 0
    bot_teleport 2 -92 5732 -1987 0 0 0
    bot_teleport 3 -292 5632 -1987 0 0 0
    bot_teleport....
    
    etc..
    when i execute the code for the first time, it spawns the bots, executes all the echos instantly, but nothing else.

    the second time, it attempts to create more bots (fails) then it teleports the bots to the first location, executes all echo commands, then nothing else.


    i tried typing:
    Code:
    say "hello"; wait 60; say "goodbye"; echo done

    and got back:
    Code:
    LOOK IT'S ADAM:hello
    done
    does anyone know how i can make this work?
     
  2. Firest0rm

    Firest0rm L4: Comfortable Member

    Messages:
    171
    Positive Ratings:
    33
    make sure whereever you're testing this has wait enabled
     
  3. adamspurgin

    adamspurgin L1: Registered

    Messages:
    42
    Positive Ratings:
    1
    of course, i'm just running it privately, the "create a server" option.


    also note the first few commands i pass.
     
  4. Tapp

    Tapp L10: Glamorous Member

    Messages:
    776
    Positive Ratings:
    211
    rather than creating a server, have you tried running a listen server (that is, use 'map koth_viaduct')?
     
  5. Lancey

    aa Lancey Currently On: ?????

    Messages:
    3,076
    Positive Ratings:
    1,314
    Perhaps you need to give the bots longer to spawn before teleporting them.
     
  6. adamspurgin

    adamspurgin L1: Registered

    Messages:
    42
    Positive Ratings:
    1
    i think i found out what my problem was, now i just need to nest about 2000 aliases....