READ THE HELP FILE
LOOK AT GAMES WHICH HAVE DONE SIMILAR THINGS AND LOOK AT THE CODE
please.
ZZT Guy's ZZT Questions
Moderators: Commodore, Zenith Nadir
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
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.
- Quantum P.
- Level 17 Accordion Thief
- Posts: 1433
- Joined: Fri Sep 12, 2003 1:41 am
- Location: Edmonds, WA
- Contact:
There are a couple of ways to do this. If you're using the built-in enemies, you could have a door object that did something like the following. This example assumes that the room is filled with lions and tigers:
#cycle 1 tells the object to run at maximum speed. The object waits a moment, then checks to see if there are any lions left; if so, it goes back to the beginning of the loop. If the lions are gone, it checks for tigers. The object will only leave the loop if the player has killed all the lions and tigers. At this point, the door will disappear (thanks to the #die command).
If you have object enemies (which I strongly recommend, as hardly anybody uses the built-in enemies anymore) you could do something like the following. This will be our enemy:
Note that right before he dies, he will give the player one gem. Let's say that there will be a total of 10 enemies in the room (the code of the other 9 would be "#bind badguy") The door would then have code that looks like this:
The number of gems that the player has represents the number of enemies in the room that he has killed. The door will constantly try to take 10 gems from the player; as soon as the player has 10 gems, he must have killed all 10 enemies, and the door opens.
Code: Select all
#cycle 1
:loop
/i
#if any lions loop
#if any tigers loop
#die
If you have object enemies (which I strongly recommend, as hardly anybody uses the built-in enemies anymore) you could do something like the following. This will be our enemy:
Code: Select all
@badguy
#cycle 2
:loop
?rndp rndne?seek?rndp rndne?seek
#if alligned shoot seek
#loop
:shot
Ack!
#give gems 1
#become red fake
Code: Select all
#cycle 1
:loop
/i#take gems 10 loop
#die
- Quantum P.
- Level 17 Accordion Thief
- Posts: 1433
- Joined: Fri Sep 12, 2003 1:41 am
- Location: Edmonds, WA
- Contact:
- Zandor 12
- What has science done???
- Posts: 355
- Joined: Wed Mar 12, 2003 5:19 am
- Location: Neo Dakota
- Contact:
Quantum P's right. Read the help file, get waist-deep into the code, and mess some shit up; asking questions is all well and good, but learning on your own is also keen!
In addition to ZZT Syndromes, I'd recommend looking at the ZZT Online Encyclopedia, a helpful collection of files that show several interesting programming tricks and engines. That stuff was like crack for me when I was first starting ZZT programming, and having a looksee will likely do you a world of good. The Mystical Winds Encyclopedia is also worth looking at; both of these help files should be somewhere on Z2.

In addition to ZZT Syndromes, I'd recommend looking at the ZZT Online Encyclopedia, a helpful collection of files that show several interesting programming tricks and engines. That stuff was like crack for me when I was first starting ZZT programming, and having a looksee will likely do you a world of good. The Mystical Winds Encyclopedia is also worth looking at; both of these help files should be somewhere on Z2.

- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
Yes it's very unnatural, but these questions are all right in the manual other than the shop which is in like 75% of ZZT games ever.Quantum P. wrote:Dos: I'm still trying to enjoy the fact that there's actually ZZT-related discussion at z2. :(
I'm willing to help with programming problems, ZZT Guy, but I strongly recommend reading the whole ZZT-OOP maunal through and looking at other people's games.
Adventure 1 taught me how to make a store. It's why I use tp as my not enough counter label.
It stands for TooPoor!
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.
- Zenith Nadir
- this is my hammer
- Posts: 2767
- Joined: Wed Mar 12, 2003 11:40 am
- Location: between the black and white spiders