 |
Usage: (ammo_total weapon_type)
Returns: How much ammo the object has
Good for counting exactly how much ammo the object has in a
certain slot. For example, in the (bg)'s ai, you might do:
(ammo_total (current_weapon_type)). I can't see why you'd want
to do this outside of the (bg)...
;;------------------------------------------------------------------------
Function: argc
Usage: (argc)
Returns: Int
Use (argc) to extract the number of command line parameters. For
example, if you started abuse by just typing "abuse -edit", then
(argc) would return 2.
;;------------------------------------------------------------------------
Function: argv
Usage: (argv [n])
Returns: String
(argv) will extract the [n]th argument from the command line.
Note that n is 0 as in C and C++. So, if you started abuse with the
command line "abuse -edit", then (argv 1) returns "-edit".
;;------------------------------------------------------------------------
Object Function: bg
Usage: (bg)
Returns: A pointer to the closest player object
bg stands for BadGuy. It returns a pointer to the _closest_ player
in the game. If you're playing a networked or multi-player game,
this may not always be the same player. For example, you might say
(with_object (bg) (set_hp 100)) to give the closest player 100% health.
;;------------------------------------------------------------------------
Function: blocked_down
... Далее >>
|