Author Topic: Inventory Objects...Help-Newbie  (Read 1879 times)

0 Members and 1 Guest are viewing this topic.

Keith

  • Guest
Inventory Objects...Help-Newbie
« on: August 11, 2002, 11:19:01 PM »
How do you add more than one inventory object? I'm working off the template and have no clue how to do it. I'm using v255....I'm clueless!

Here is how my test room looks:
// ****************************************************************************
//
// Logic 3: Second Room
//
// ****************************************************************************

#include "defines.txt"
#define rose o3
#define candy o4

if (new_room) {
 load.pic(room_no);
 draw.pic(room_no);
 discard.pic(room_no);
 set.horizon(37);

 animate.obj(rose);
 load.view(3);
 set.view(rose,3);
 set.loop(rose,0);
 set.cel(rose,0);
 position(rose,58,125);
 set.priority(rose,11);
 ignore.objs(rose);
 stop.cycling(rose);
 v255 = 3;
 if (obj.in.room("rose",v255)) { draw(rose); }

 animate.obj(candy);
 load.view(4);
 set.view(candy,4);
 set.loop(candy,0);
 set.cel(candy,0);
 position(candy,60,150);
 set.priority(candy,11);
 ignore.objs(candy);
 stop.cycling(candy);
 if (obj.in.room("candy box",v255)) { draw(candy); }





if (prev_room_no == 2) {
  position(ego,76,162);
  set.loop(ego,3);
}

 draw(ego);
 show.pic();
}

if (said("look")) {
 print("This is an empty room.");
}

if (said("get","rose")) {
  v255 = 3;
  if (obj.in.room("rose",v255)) {
    if (posn(ego,54,127,60,127)) {
      print("Ok.");
      erase(rose);
      get("rose");
    }
    else {
      print("You're not close enough.");
    }
  }
  else {
      reset(input_parsed);
  }
}

if (said("look","rose")) {
  v255 = 3;
  if (obj.in.room("rose",v255)) {
    print("There is a long-stem rose on the counter.");
  }
  else {
    reset(input_parsed);
  }
}

if (said("get","candy")) {
  v255 = 3;
  if (obj.in.room("candy box",v255)) {
    if (posn(ego,54,127,60,127)) {
      print("Ok.");
      erase(candy);
      get("candy box");
    }
    else {
      print("You're not close enough.");
    }
  }
  else {
      reset(input_parsed);
  }
}

if (said("look","candy")) {
  v255 = 3;
  if (obj.in.room("candy box",v255)) {
    print("There is a box of candies on the floor.");
  }
  else {
    reset(input_parsed);
  }
}


if (ego_edge_code == bottom_edge) {
  new.room(2);
}

return();



Offline Andrew_Baker

Re:Inventory Objects...Help-Newbie
« Reply #1 on: August 19, 2002, 11:06:47 PM »
Refer to the previous thread HELP! PLEASE! HELP!  It discusses your problem.
I hope you realize that one day I will devour the Earth.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.066 seconds with 21 queries.