Problems ADDING objects, v0.20
Posted: Wed Aug 14, 2002 1:33 pm
Here's an interesting one!
I have created two clones of a square alcove with the necessary front and side bitmaps. They are called WALLITEM_ALCOVESWITCHOUT and WALLITEM_ALCOVESWITCHIN. Each alcove, as you might guess, works as an ordinary alcove but has a graphic that looks like there's a switch inside.
I want to toggle from one state to the other when the player clicks the alcove, so it looks like they've activated the switch. I use this script:
<pre> 617 WALLITEM_ALCOVESWITCHOUT 1 17 1 EAST STATE=(VISIBLE) OPBY=(MOUSE) ACTION=(TOGGLE)        TARGET=(618) OPTIONS=(DESTROY_ITEM,DISABLE_SELF)618 WALLITEM_ALCOVESWITCHIN 1 17 1 EAST STATE=(INVISIBLE)</pre>
This does work kind of, but it doesn't toggle the 'in' state when you click the alcove. Instead, RTC displays a regular square alcove! It appears to have omitted the clone entirely, even though it's all correctly defined.
I've also tested that both states display correctly as static objects, and they do. So this appears to be a bug.
Secondary, and this is more a suggestion, this effect actually doesn't work very well anyway because if you're carrying an object when you click the switch/alcove, it activates the switch as well as dropping the item in the alcove. Is there perhaps a way of modifying this behaviour so that RTC ignores the switch click if you're holding an item? I.e - you must click the alcove with an empty hand, or remove all objects from the alcove, before you can click the switch?
I have created two clones of a square alcove with the necessary front and side bitmaps. They are called WALLITEM_ALCOVESWITCHOUT and WALLITEM_ALCOVESWITCHIN. Each alcove, as you might guess, works as an ordinary alcove but has a graphic that looks like there's a switch inside.
I want to toggle from one state to the other when the player clicks the alcove, so it looks like they've activated the switch. I use this script:
<pre> 617 WALLITEM_ALCOVESWITCHOUT 1 17 1 EAST STATE=(VISIBLE) OPBY=(MOUSE) ACTION=(TOGGLE)        TARGET=(618) OPTIONS=(DESTROY_ITEM,DISABLE_SELF)618 WALLITEM_ALCOVESWITCHIN 1 17 1 EAST STATE=(INVISIBLE)</pre>
This does work kind of, but it doesn't toggle the 'in' state when you click the alcove. Instead, RTC displays a regular square alcove! It appears to have omitted the clone entirely, even though it's all correctly defined.
I've also tested that both states display correctly as static objects, and they do. So this appears to be a bug.
Secondary, and this is more a suggestion, this effect actually doesn't work very well anyway because if you're carrying an object when you click the switch/alcove, it activates the switch as well as dropping the item in the alcove. Is there perhaps a way of modifying this behaviour so that RTC ignores the switch click if you're holding an item? I.e - you must click the alcove with an empty hand, or remove all objects from the alcove, before you can click the switch?