 |
Function: next_savegame_name
Usage: (next_savegame_name)
Returns: String?
Use (next_savegame_name) to return the next slot available for
a call to (save_game). For example, all those Save Stations in
Abuse eventually call the code (save_game (next_savegame_name)).
;;------------------------------------------------------------------------
Object Function: next_picture
Usage: (next_picture)
Returns: T or nil
Advances the current frame by 1. If we're at the end of the
frames for this state, stay there and return nil. Sort of
like (set_current_frame (+ (current_frame) 1)).
;;------------------------------------------------------------------------
Object Function: otype
Usage: (otype)
Returns: An obj_class
Converts the obj_ptr for the current object back to the class
for that object. Is useful when you want to do something differnet
depending on what an object is. For example, if I want everyone
to be damaged by lava, except for FIRE_HOUNDS, which should be
healed, I might do this in the lava_ai.
(let ((target (find_object_in_area (- (x) 10) (+ (x) 10) (y) (+ y 3)
bad_guy_list)))
(with_object target (if (eq (otype) FIRE_HOUNDS)
(set_hp (+ (hp) 10))
(do_damage target 10))
)
)
;;------------------------------------------------------------------------
... Далее >>
|