mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-20 21:25:42 +00:00
add the adapter
This commit is contained in:
parent
13a6417a9d
commit
97b1592dec
52
scripts/bots_adapter.gsc
Normal file
52
scripts/bots_adapter.gsc
Normal file
@ -0,0 +1,52 @@
|
||||
init()
|
||||
{
|
||||
thread setup_builtins();
|
||||
}
|
||||
|
||||
setup_builtins()
|
||||
{
|
||||
waittillframeend;
|
||||
|
||||
level.bot_builtins["printconsole"] = ::do_printconsole;
|
||||
level.bot_builtins["filewrite"] = ::do_filewrite;
|
||||
level.bot_builtins["fileread"] = ::do_fileread;
|
||||
level.bot_builtins["fileexists"] = ::do_fileexists;
|
||||
level.bot_builtins["botaction"] = ::do_botaction;
|
||||
level.bot_builtins["botstop"] = ::do_botstop;
|
||||
level.bot_builtins["botmovement"] = ::do_botmovement;
|
||||
}
|
||||
|
||||
do_printconsole( s )
|
||||
{
|
||||
PrintConsole( s );
|
||||
}
|
||||
|
||||
do_filewrite( file, contents, mode )
|
||||
{
|
||||
FileWrite( file, contents, mode );
|
||||
}
|
||||
|
||||
do_fileread( file )
|
||||
{
|
||||
return FileRead( file );
|
||||
}
|
||||
|
||||
do_fileexists( file )
|
||||
{
|
||||
return FileExists( file );
|
||||
}
|
||||
|
||||
do_botaction( action )
|
||||
{
|
||||
self BotAction( action );
|
||||
}
|
||||
|
||||
do_botstop()
|
||||
{
|
||||
self BotStop();
|
||||
}
|
||||
|
||||
do_botmovement( left, forward )
|
||||
{
|
||||
self BotMovement( left, forward );
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user