ZZT IS #TRYING it will move if it's not blocked
Moderators: Commodore, Zenith Nadir
- 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
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.
Follow Worlds of ZZT on Twitter
Apologies for the old post you may have just read.
- Alexis Janson
- wacky morning DJ
- Posts: 307
- Joined: Fri Feb 20, 2004 1:05 am
- Quantum P.
- Level 17 Accordion Thief
- Posts: 1433
- Joined: Fri Sep 12, 2003 1:41 am
- Location: Edmonds, WA
- Contact:
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
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
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.
?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.
- Quantum P.
- Level 17 Accordion Thief
- Posts: 1433
- Joined: Fri Sep 12, 2003 1:41 am
- Location: Edmonds, WA
- Contact:
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!
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!
- Zenith Nadir
- this is my hammer
- Posts: 2767
- Joined: Wed Mar 12, 2003 11:40 am
- Location: between the black and white spiders