 |
For example, you might want to do a:
(if (> (ammo_total (current_weapon_type)) 0) to see if the player
can fire the weapon.
;;------------------------------------------------------------------------
Object Function: damage_fun
Usage: (damage_fun amount from hitx hity push_xvel push_yvel)
Returns: dunno
Causes the current object to take [amount] damage. I suppose this
entails subtracting [amount] from the object's hitpoints. It also
"moves" them with velocity [push], but I'm not sure if this is
added directly to the position or the velocity. [hit] is the location
that the damage occured, and I think [from] is the object that
damaged you, though I can't know for certain.
;;------------------------------------------------------------------------
Function: def_char
Usage: (def_char obj_class (sub_function)*)
Returns: nothing important
(def_char) is the function you use to create new types of objects.
Everything you see in the object window of the editor (and more)
has a def_char associated with it somewhere in the lisp code (unless
it's pre-compiled, but I don't think any are). [obj_class] is the
way you refer to the new object. There are several different
sub_functions that you have to call as parameters to the def_char
to fully define the object. They are described below:
Sub-function: vars
Usage: (vars [var]*)
The (vars) function creates a set of local variables visible
only inside this object. You can set these variables using
(setq) and you can get their values by just typing the token.
... Далее >>
|