1 module itemStimpack is "item" "StimPack";
9 // setup actor animations
10 public void initializeAnim () {
11 animClearFrames("item", "StimPack", "sleep");
12 animAddFrame("item", "StimPack", "sleep", ACTOR_DIR_LEFT, "sprites/items/stima0.vga");
16 // setup actor properties
17 public void initialize (Actor me) {
18 // `classname` and `classtype` will be set by the engine
19 //me.classname = "StimPack";
20 //me.classtype = "item";
23 me.actorSetAnimation("sleep");
27 me.attachedLightRGBX(200, 200, 0, 32);
28 me.flags |= AF_NOGRAVITY;
33 public void think (Actor me) {
36 writeln("STIMPACK THINK: ", me);
37 writeln(" light: xofs=", me.attLightXOfs, "; yofs=", me.attLightYOfs, "; rgbx=", me.attLightRGBX);
38 //me.attLightXOfs = 0;
39 //me.attLightYOfs = -5;
40 //me.attachedLightRGBX(200, 200, 0, 32);
43 // we can directly check for player overlap, but i want to test hitlists
44 //writeln("stimpack: think");
46 for (Actor other = getNextTouchListItem; other; other = getNextTouchListItem) {
47 //if (me.x < 32) writeln("stimpack: other=", other.classname);
49 writeln("actor took medkit!");
50 addMessage("actor took medkit!");