which toolkit has keys & locks that are robots?
Moderators: Commodore, Zenith Nadir
which toolkit has keys & locks that are robots?
hi again! which toolkit has keys & locks that are robots in disguise???
-smilymzx
-smilymzx
- Zenith Nadir
- this is my hammer
- Posts: 2767
- Joined: Wed Mar 12, 2003 11:40 am
- Location: between the black and white spiders
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
Yeah, it was like Morekeys or something stupid like that.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
The Mystical Winds Encyclopedia had an object library of immitation robots. I don't remember if I made key/door immitations, but Commodore's code is about as close as you can get. Objects don't have any way of setting real keys, nor can they be "captured" by the player like ammo, torches, gems, etc., unless you do some freaky stuff that you probably don't want to do (which requires multiple objects).
-
- LOOK OUT FER BAAAD BOB
- Posts: 116
- Joined: Fri Mar 28, 2003 12:51 am
If you're really bored, you could have a yellow object for yellow key code like so:
Hence, to give the illusion that a yellow key was there all along. Since this is practically pointless in itself, have a green key-like object make a yellow key.
Code: Select all
@Yellow key
#cycle 1
:loop
#if contact do
#loop
:do
#go opp seek
#put seek yellow key
#die
I remember in 1 game I made on ZZT I made the program to atomaticly giv you the key in 1 secend. This is how, from west to est (all ar color dark red on dark red):
(1) Object:
(2) Key
(3) Fake
(4) Duplicator: Dir=W Speed=fast speed
(5) Extra Player No Stats
Put a red solid wall around all uv this.
(1) Object:
Code: Select all
@secret
#end
:ok
#go e
(3) Fake
(4) Duplicator: Dir=W Speed=fast speed
(5) Extra Player No Stats
Put a red solid wall around all uv this.
Last edited by 136 on Sat Dec 27, 2003 5:20 pm, edited 1 time in total.
If you want a door that is a real door but displays a different message when you don't have the key, do the following:
Key
Door
You can use whatever color of key or door you want.
Key
Code: Select all
@YellowKey
#cycle 1
:loop
#if contact do
#loop
:do
#if not key do2
You already have a key of this kind!
#loop
:do2
#set key
#become yellow key
Code: Select all
@YellowDoor
#cycle 1
:loop
#if contact check
#loop
:check
#if key do2
You don't have a key!
#loop
:do2
#clear key
#become yellow door
There is a problem with that code. If the player already has a key and stands next to the key, you would see:
You already have a key of this kind!
You already have a key of this kind!
You already have a key of this kind!
etc. in a text box. Similar situation if you stand next to the door and don't have a key. You can fix this by adding "/i" before "#loop", but then the message at the bottom of the screen would rapidly refresh. I recommend adding another loop that it stay in as long as the player is in contact with the object before returning to the original loop. This would ensure that it doesn't display the message again until the player at least steps away and returns.
I wouldn't use real keys in conjunction with flags because that uses up both flag and key space. If you're doing something simple like that last example, I would just use real keys and door, but if you're doing something that absolutely requires them to be objects, I would probably use flags. One flag can easily represent three keys using a "piggy-back" technique. Basically, the following flags could represent "key 1" being set: key100, key101, key110, key111. Whereas flag 2 would be: key010, key011, key110, key111. Instead of just checking if "flag1" is set, check if one of the four are set. Setting the flag is a little more complicated, so here's a snippet:
For doors, you would just switch the 'clear's and 'set's and switch the flag names in the two groups of 'if' commands.
You already have a key of this kind!
You already have a key of this kind!
You already have a key of this kind!
etc. in a text box. Similar situation if you stand next to the door and don't have a key. You can fix this by adding "/i" before "#loop", but then the message at the bottom of the screen would rapidly refresh. I recommend adding another loop that it stay in as long as the player is in contact with the object before returning to the original loop. This would ensure that it doesn't display the message again until the player at least steps away and returns.
I wouldn't use real keys in conjunction with flags because that uses up both flag and key space. If you're doing something simple like that last example, I would just use real keys and door, but if you're doing something that absolutely requires them to be objects, I would probably use flags. One flag can easily represent three keys using a "piggy-back" technique. Basically, the following flags could represent "key 1" being set: key100, key101, key110, key111. Whereas flag 2 would be: key010, key011, key110, key111. Instead of just checking if "flag1" is set, check if one of the four are set. Setting the flag is a little more complicated, so here's a snippet:
Code: Select all
@key
#end
:touch
#if key100 havekey
#if key101 havekey
#if key110 havekey
#if key111 havekey
' The player doesn't have the key, so we're setting it
#if key000 k00
#if key001 k01
#if key010 k10
#if key011 k11
:k00
#clear key000
#set key100
#die
:k01
#clear key001
#set key101
#die
:k10
#clear key010
#set key110
#die
:k11
#clear key111
#set key111
#die
:havekey
You already have this key.
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
Christ people IT'S FUCKING KEYS. WHO CARES?
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.