ZZT IS #TRYING it will move if it's not blocked

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

Moderators: Commodore, Zenith Nadir

Post Reply
User avatar
Dr. Dos
OH YES! USE VINE WHIP! <3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

ZZT IS #TRYING it will move if it's not blocked

Post by Dr. Dos »

otherwise it will proceed to the next line of code.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
User avatar
Alexis Janson
wacky morning DJ
Posts: 307
Joined: Fri Feb 20, 2004 1:05 am

Post by Alexis Janson »

This was one of the last commands I learned about in ZZT. I found out about it while editing Town of ZZT.

I don't know how I remember that but there you go
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. »

Huh, it was one of my last commands, too. I was skipping through the built-in help file, and I had already read most of the ZZT-OOP Reference Manual; for the sake of completeness, I was just scanning the list for sections I hadn't read yet. #try was one of them.

I was so proud of myself once I learned #try because I now knew every documented ZZT-OOP command so im like an expert now and wow were there many commands i bet theres more commands than in qbasic and all the professional programmers use qbasic

i dont know why they still use qbasic they should switch to an advanced object oriented language like zzt-oop

seriously those microsoft guys should become zzt-oop experts like me

they can join my zzt company
MadTom
<:D
Posts: 886
Joined: Fri May 13, 2005 6:37 am

Post by MadTom »

<BillGates> i won another madtom's pick for the company mr quantum sir!!
<Quantum_P> *puffs cuban cigar* well done, bill, well done. polish my boots.
Ando
2SEXY4U
2SEXY4U
Posts: 810
Joined: Sat Sep 04, 2004 1:08 am
Location: Oak Harbor, WA
Contact:

Post by Ando »

I think that ? can be used for #try as well. I learned that by editing Oof's "Special Adventure"!
wil
GABZABOOLZABBA
Posts: 105
Joined: Mon Mar 15, 2004 6:21 pm
Location: EAST SIDE
Contact:

Post by wil »

the thing that makes #try different and so special (and differetn from ?) is that if the #try fails, it will not go straight to the next line; instead, it will continue to execute code from that same line. This works for #take and #if, too.

?N will move north, unless blocked, then nothing.
#TRY N will do the same.
#TRY N GIVE GEMS 4 will attempt to move north; if it is blocked, it will instead give the player 4 gems.
#TRY N TAKE GEMS 4 SHOOT SEEK will move north, unless blocked, in which case it will take 4 gems; however, if the player has fewer than 4 gems, it will instead shoot seek.
#try n ?s#if blocked w /e#shoot seek will attempt a northward movement; otherwise, it will attempt to move south. Whether it succeeds or not, it will check if it is blocked to the west. If it is the case, it will move east. If it is blocked to the east it will try repeatedly to move east until it can do so. Once if has done so, it will shoot toward the player.

As you can see, these conditional statements can get quite long and complex. In run-on there are a couple times when i had to hex-edit to get all the conditionals to fit on one line! 60 characters is not long enough, by golly!

also, welcome to #try. now you can make video games.
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. »

This is amazing.

First, Nadir creates a thread proclaiming ZZT's death.
Next, Dos creates a joke thread with a ZZT-OOP-related title.
Then people start talking about ZZT-OOP.
Finally, wil demonstrates some very cool coding tricks in ZZT.

Fear of the death of ZZT has caused this joke thread to be taken over by more active ZZT discussion than there is in the rest of ZZT General!
Ando
2SEXY4U
2SEXY4U
Posts: 810
Joined: Sat Sep 04, 2004 1:08 am
Location: Oak Harbor, WA
Contact:

Post by Ando »

You have a point thaar.
User avatar
Zenith Nadir
this is my hammer
Posts: 2767
Joined: Wed Mar 12, 2003 11:40 am
Location: between the black and white spiders

Post by Zenith Nadir »

i only started that thread because of jur's SHUT UP AND ZZT post on the zzt livejournal
he looked upon the world and saw it was still depraved :fvkk:

Overall: Rotton egg for breakfast
User avatar
VinceP
&lt;3s you
Posts: 176
Joined: Tue Jul 20, 2004 4:48 pm

Post by VinceP »

good job, nadir. good job.
Post Reply