ZZT Guy's ZZT Questions

NOTE: I HATE A LOT OF YOUR ZZT GAMES, SO WATCH OUT!

Moderators: Commodore, Zenith Nadir

User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

ZZT Guy wrote:
Quindo wrote:SInce this is about quistions ive got one. Whats up with corrupt boards?
Corrupt....boards?
A board that had bad data written to it, rendering it unuseable by ZZT. It can happen under a number of circumstances. If ZZT crashes, if your external editor crashes, if your game file exceeds 250k, or if a single board exceeds 20k. This does not happen everytime you crash or break these rules, but it increases your likelyhood that a board or several boards will be corrupted. It also can happen for no apparent reason, though not very often. Your title screen can crash it too if you are trying to do something naughty with it. I won't go into all the ways you can force ZZT to crash, it's not too hard to figure out. If you try though make sure you're using a scrape world.

If you're trying to do something big on a board it's disturbingly easy to go over the 20k limit. Use kevedit and it will be able to tell you the size of individual boards.
Last edited by Commodore on Sat Sep 30, 2006 9:37 pm, edited 1 time in total.
*POW* *CLANK* *PING*
User avatar
ZZT Guy
enjoys muffins
Posts: 73
Joined: Wed Sep 27, 2006 6:17 pm
Location: Town Of ZZT

Post by ZZT Guy »

Another question,
How do i get it so that when an object
touches the player, a message appears?
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

you need a loop and an #if statement.

:loop
#if contact #do
'movement code
#loop
:do
Hi! I touched you!
#end

This is good for making enemies too.
It will go off if the player gets next to the object, or the other way around. It's not really the object touching the player, but its as close as you can get.
*POW* *CLANK* *PING*
User avatar
ZZT Guy
enjoys muffins
Posts: 73
Joined: Wed Sep 27, 2006 6:17 pm
Location: Town Of ZZT

Post by ZZT Guy »

How do i get it so that an object can give,
or take away, things? like, take3 gems and
give you some ammo...
User avatar
Jotz
rank bank jotz
Posts: 120
Joined: Thu Oct 16, 2003 2:59 am
Contact:

Post by Jotz »

#give ammo 7
#take gems 3

etc.

Have you checked out the built-in help menu in ZZT? If not, read it first before asking any more questions.
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

*POW* *CLANK* *PING*
User avatar
Quantum P.
Level 17 Accordion Thief
Posts: 1433
Joined: Fri Sep 12, 2003 1:41 am
Location: Edmonds, WA
Contact:

Post by Quantum P. »

If you're making like a storekeeper, you'll want something like this, though:

Code: Select all

#take gems 3 toopoor
#give ammo 7
Here's your ammo!
#end
:toopoor
You don't have enough gems to pay for that!
This way, #give ammo 7 will not run until the player has already paid for it.

Here's an online copy of the ZZT-OOP reference manual.
User avatar
Schroedingers Cat
We must invent teleportation!
Posts: 721
Joined: Mon Jun 19, 2006 11:35 pm
Location: Idaho, Wisconsin

Post by Schroedingers Cat »

I wrote:
MadTom wrote:"Can I change my username without asking the staff to do it?"

Right Here.
Z2 wrote:WARNING: All who imitate other people with this will be banned, even if they are mods or admins!
Username/Password Recovery wrote:
Error adding request.
:agh:
Believe it or not, this was actually a request to change my name back to "Schrödinger's Cat" (Mind the capitalization.) I was trying to point out how the username change wasn't properly working. Could somebody either
  • A) Fix my name
or
  • B) Fix the username changing script
?
Ryan Ferneau
LOOK OUT FER BAAAD BOB
Posts: 116
Joined: Fri Mar 28, 2003 12:51 am

Post by Ryan Ferneau »

Commodore wrote:If you're trying to do something big on a board it's disturbingly easy to go over the 20k limit.
ALWAYS USE #BIND.
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

good point, unless you use #zap. then things can get ugly.
*POW* *CLANK* *PING*
MadTom
<:D
Posts: 886
Joined: Fri May 13, 2005 6:37 am

Post by MadTom »

Commodore wrote:If you're trying to do something big on a board it's disturbingly easy to go over the 20k limit. Use kevedit and it will be able to tell you the size of individual boards.
ZZT Guy: http://zzt.org/?p=gtsm
User avatar
Quantum P.
Level 17 Accordion Thief
Posts: 1433
Joined: Fri Sep 12, 2003 1:41 am
Location: Edmonds, WA
Contact:

Post by Quantum P. »

Done. The name change, not the script rewriting.

EDIT: That script was written for people to change their names from numbers back when the database was having problems in January 2004. I'm not so sure it should still be in use.
User avatar
ZZT Guy
enjoys muffins
Posts: 73
Joined: Wed Sep 27, 2006 6:17 pm
Location: Town Of ZZT

Post by ZZT Guy »

Question: Im trying to make my own object that can sell things
to the player,
but how do i get it, so that when i press enter on a selectable thing in the text window it opens anbother message?
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

use !
!message;text
then make the message lead you to more text or commands to take gems.

!buytorch;1 torch, 5 gems.
!buyammo;1 ammo, 3 gems.
#end
:buytorch
#take gems 5 toopoor
#give torches 1
Thank you!
#end
:buyammo
#take gems 3 toopoor
#give ammo 1
Thank you!
#end
:toopoor
You don't have enough money.
#end
*POW* *CLANK* *PING*
User avatar
ZZT Guy
enjoys muffins
Posts: 73
Joined: Wed Sep 27, 2006 6:17 pm
Location: Town Of ZZT

Post by ZZT Guy »

How do i get so that when the player shoot all the enimies on the
board, a wall dissapears allowing him/her to go onto the next room?
Post Reply