Page 1 of 1

Clarification of a few new things in v0.20 please...

Posted: Mon Aug 12, 2002 7:36 pm
by Gambit37
I've been updating Kid dungeon to v0.20, and discovered that the mechanics of many objects appear to have changed. George, can you clarify a few things for me please:

1) Previously when creating generators, I had to activate and deactivate them quickly, otherwise they kept churning out monsters. Now it seems that generators will only create a monster each time they are activated, and they don't need to be deactivated. Is this correct? If so, cool--it makes things a lot easier!

2) In previous versions, I've been placing the same object (for example, three green gem switches) on the same tile and making each copy activate something else. This worked fine and only one click was heard. In v0.20 it seems that all the objects sound effects are played so you hear three clicks overlayed. Does this mean that I should rebuild these mechanisms using ONE switch and several RELAYS?

3) Could you please clarify the timings for the DELAY and RECHARGE_TIME parameters. I believe you said that they were in game ticks and that each tick is 1/6 of second. Therefore, a DELAY of 6 = 1 second, right?

4) What's the secondary key colour for things like MAGIC WINDOW?

5) How do I make a switch, such as a gem switch, pop out again after a set time? Is this an inherent property, or would I have to simulate it using relays and changing visible states of multiple objects?

Hope you can clear those up!

Re: Clarification of a few new things in v0.20 please...

Posted: Tue Aug 13, 2002 10:03 am
by George Gilbert
1) I believe you're right (although I'd have to check the source code). The intention however is that activating the monster generator activates it once.

2) Yes - you should be using relays - if for no other reason than the DESTROY_ / DISABLE_ options are a pain to implement otherwise.

3) Yes - got it exactly.

4) It's a Puce-y orange - can't remember the RGB values off hand, but I'll go look them up tonight for you...

5) You'll need some relays I'm afraid.

Re: Clarification of a few new things in v0.20 please...

Posted: Tue Aug 13, 2002 10:32 am
by Gambit37
Thaks for that, all nice and easy, except:

5) Would I have to create a new object with a new bitmap for the in or out states of these buttons, or is there a way of referencing each state? E.g: WALLITEM_SWITCH_GREEN_IN or WALLITEM_SWITCH_GREEN_OUT????

Re: Clarification of a few new things in v0.20 please...

Posted: Tue Aug 13, 2002 11:44 am
by George Gilbert
No, the two bitmaps are part of the single object. You can set them up initially by using the STATE option (e.g. see how the SCONCE objects are set up), and move between the states by simply (de)activating / togling the object.

Re: Clarification of a few new things in v0.20 please...

Posted: Tue Aug 13, 2002 11:47 am
by Gambit37
Ah, gotcha, thanks!

Re: Clarification of a few new things in v0.20 please...

Posted: Wed Aug 14, 2002 12:23 pm
by Gambit37
I tried a couple of ways of doing the bouncing button, and this seems the most straightforward script to achieve the effect:

<pre> 614 WALLITEM_RELAY 1 18 1 SOUTH ACTION=(TOGGLE) TARGET=(619) DELAY=(6)619 WALLITEM_SWITCH_BLUE 1 18 1 EAST STATE=(VISIBLE) OPBY=(MOUSE)ACTION=(ACTIVATE) TARGET=(614) OPTIONS=(STATE:A)</pre>

The relay clearly changes the state of the switch form A to B. However, I originally tried to do this using two separate switches and changing their VISIBLE state, but no matter what I did, I couldn't change this.

How do you change the visibility of switches and such like on demand? It's easy for alcoves - it just works, but it doesn't seem to work for "interactive" objects???

Re: Clarification of a few new things in v0.20 please...

Posted: Wed Aug 14, 2002 12:28 pm
by George Gilbert
That's right - you can't.

Objects which have two clearly different states (e.g. switch in / out, lever up / down) when (de)activated / toggled change their state. Objects which do not have two states (e.g. alcoves) change their visibility.

Re: Clarification of a few new things in v0.20 please...

Posted: Mon Aug 19, 2002 10:31 am
by George Gilbert
Better late than never...

4) I was getting confused with another internal "magic" colour. The one for the window is not orange at all, it's bright red - RGB(255,0,0)