Re: Lighting rooms with objects in your inventory.

From: Kras Kresh (kras_kresh@hotmail.com)
Date: 05/09/02


>From: David Cole <tiznor@softhome.net>
>Subject: Re: [CIRCLE] Lighting rooms with objects in your inventory.
>Date: Wed, 24 Apr 2002 20:32:13 -0500
>
> > You should read what you write. You are sending the character to the
>room,
> > but he isn't there yet. So why are you using ch->in_room?
>
>ch->in_room is used all through char_to_room, does this mean the entire
>function is waked? But to resolve the problem of what i'm trying to do,
>look
>in act.movment, in the has_boat function. Right there is what im trying to
>do, and have acomplished now.

This is what you should have in the function of char_to_room:
    ch->next_in_room = world[room].people;
    world[room].people = ch;
    IN_ROOM(ch) = room;

    if (GET_EQ(ch, WEAR_LIGHT))
      if (GET_OBJ_TYPE(GET_EQ(ch, WEAR_LIGHT)) == ITEM_LIGHT)
        if (GET_OBJ_VAL(GET_EQ(ch, WEAR_LIGHT), 2))     /* Light ON */
          world[room].light++;

You are including that loop, and you are saying my fix isn't working.
Where did you put your loop? Before or after the above pasted. I can
guarantee you that it won't if you put it before. That would increase the
light sources in the room the character was in, not going to. Also, you want
to do a check in obj_to_char and obj_from_char for your item.

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT