No announcement yet.

spawnbot via key press

  • Filter
  • Time
  • Show
Clear All
new posts

    spawnbot via key press

    Two problems for you guys !

    First problem :

    In my mod, i try to spawn a new bot when the *client* press a key.

    I use a new gametype and a mutator (which I call via the MutatorClass).
    My gametype extends xTeamGame.

    First I tried the interaction way. The interaction works properly but I end with a function KeyEvent where I'm unable to call SpawnBot.

    After I tried the mutate function which works very well too but again calling SpawnBot from this place seems to be impossible.

    In the gametype I can call Spawnbot but can't check a keypress !

    Second problem :

    I use CTF maps. But I want to get rid of the flags. In my mutator I call the CheckReplacement function like a brute ! The flag base disappears but not the flag itself...........

    if ( Other.IsA('xRealCTFBase') || Other.IsA('xRedFlagBase') || Other.IsA('xRedFlag') || Other.IsA('xBlueFlagBase') || Other.IsA('xBlueFlag') || Other.IsA('xCTFBase') || Other.IsA('CTFFlag'))

    How to do ?
    I'm always using Wiki and the search option of this forum, but this time I'm stuck even with these tools... Any help would be greatly appreciated.

    If you want to spawn bot during gameplay try to use ForceAddBot()

    If u want to get rid of the flags you can achieve that by simply running xgame.xdeathmatch gametype on ctf map.



      I figured out how to spawn the bots in the meantime but I'm still stuck in erasing the flags........ I'll give a try to your solution......