 |
This is useful if you want to link something, but aren't sure if
you're already linked (I dunno what linking the same object twice
might do).
(if (has_object some_object) nil (link_object some_object))
;;------------------------------------------------------------------------
Function: has_weapon
Usage: (has_weapon weapon_type)
Returns: T or nil
Checks to see whether or not the player already has the weapon
[weapon_type]. If they don't, you can use (give_weapon) to give
it to them. If they do, you can use (add_ammo) to give them some
more ammo, or take it away. For example:
(if (has_weapon type) (add_ammo type 10) (give_weapon type))
;;------------------------------------------------------------------------
Function: hurt_radius
Usage: (hurt_radius x y rad amount obj_ptr push)
Returns: dunno
Damages everyone within [rad] pixels of position [x] [y] by
[amount] damage, except for the object [obj_ptr]. If you want
to damage everyone, set [obj_ptr] to nil. I have no idea what
the last parameter is for, but it ranges from 10 to 30 in the
Abuse code. You might write, (hurt_radius (x) (y) 19 30 (me) 15)
to damage everyone around you, but not take damage yourself.
The [push] parameter is how far to push the offending object.
;;------------------------------------------------------------------------
Object Function: hp
Usage: (hp)
Returns: The value of the hp variable.
(hp) returns how many hitpoints the current object has left.
There's nothing special about how many (hp) a creature has, it
... Далее >>
|