source: abuse/trunk/data/addon/aliens/powerups.lsp @ 634

Last change on this file since 634 was 589, checked in by Sam Hocevar, 12 years ago

data: remove exact duplicate Lisp files, merge all main space Lisp files,
and move most frabs addons to the main data directory.

File size: 1.5 KB
Line 
1;; Copyright 1997 Mike Moss (tfirestorm@aol.com),  All Rights reserved
2;; See read me for more details on usage rights
3;; blah blah yackety smackety
4
5;; New Power Up objects
6
7(defun shlmp_ai ()
8  (try_move 0 10)
9  (next_picture)
10  (if (touching_bg)
11        (progn
12           (with_object (bg) (make_view_solid (find_rgb 255 255 255)))
13           (with_object (bg) (setq special_power SHLAMP_POWER))
14           (with_object (add_object_after SHLMP2 (x) (y)) (link_object (bg)))
15           (with_object (add_object_after WTW (x) (y)) (link_object (bg)))
16        nil)
17    T))
18
19(def_char SHOULDER_LAMP
20  (funs (ai_fun shlmp_ai))
21  (range 20 20)
22  (states "addon/aliens/aliens.spe" (stopped "shlamp")))
23
24(defun shlmp2_ai ()
25   (if (> (total_objects) 0)
26      (progn
27        (set_x (with_object (get_object 0) (x)))
28        (set_y (with_object (get_object 0) (- (y) (/ (picture_height) 2) )))))
29   (if (eq (total_lights) 1)
30      (progn
31        (set_light_x (get_light 0) (x))
32        (set_light_y (get_light 0) (y)))
33    nil)
34  (if (not (eq (with_object (get_object 0) special_power) SHLAMP_POWER))
35        (progn
36        (if (eq (total_lights) 1)
37           (delete_light (get_light 0))) nil)
38        T))
39
40(defun slamp_cons ()
41        (link_light (add_light 0 (x) (y) 1 100 0 0)))
42
43(def_char SHLMP2
44  (range 1000 1000)
45  (flags (unlistable T))
46  (funs  (ai_fun                shlmp2_ai)
47         (constructor   slamp_cons)
48         (draw_fun              dev_draw))
49  (states "art/misc.spe"
50          (stopped           "lhold")))
51
52(def_char WTW
53  (range 1000 1000)
54  (flags (unlistable T))
55  (funs (draw_fun dev_draw))
56  (states "art/misc.spe" (stopped "marker")))
57
Note: See TracBrowser for help on using the repository browser.