n00b ZZT-OOP question about #give time

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

Moderators: Commodore, Zenith Nadir

Post Reply
User avatar
Ian Plastic
newcomer
Posts: 5
Joined: Sat Nov 17, 2007 10:49 pm

n00b ZZT-OOP question about #give time

Post by Ian Plastic »

Are there any differences between time and the other #give/#take items (health, ammo, etc)?

For example, if I create a game devoid of boards with a time limit, can time be used as just another counter, or does it act funny?
Gobble Goo!
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

without zzt in front of me I can guess that if you set the the time it will start to countdown and then eventually hurt the player.

also in an odd twist you have to #take time to actually make the counter go up and #give time to take it.
*POW* *CLANK* *PING*
gingermuffins
Posts: 371
Joined: Fri Sep 01, 2006 1:30 am

Post by gingermuffins »

For example, if I create a game devoid of boards with a time limit, can time be used as just another counter, or does it act funny?
<s>I'm pretty sure that the time counter ticks down regardless of whether there's a limit set or not</s> (actually i don't know). It resets every time you travel between screens.

to my knowledge, the only use the time counter has (when not being used normally) is for checking if the player has just entered a board.
wil wrote:...In addition, if you're willing to do a bit of shit for it, the following are invaluable tools when developign unique inventory engines:

First: the "I know when you re-entered the board" trick. This trick is very useful because it uses the "time" variable, which nobody uses anyway.

Code: Select all

@checkingobject
#cycle 1
:enteredboard
#give time 16300
You have entered the board!
Whee!
Execute valuable entered board code here.
:loop
/i/i#take time 1 enteredboard
#loop
This code is most valuable because it happens completely behind the scenes. If you don't want to tell them, people won't even know their progress across boards is being tracked.
User avatar
Ian Plastic
newcomer
Posts: 5
Joined: Sat Nov 17, 2007 10:49 pm

Post by Ian Plastic »

Thanks guys. Good to know.
Gobble Goo!
gingermuffins
Posts: 371
Joined: Fri Sep 01, 2006 1:30 am

Post by gingermuffins »

You could make use of the time counter if you had an object #take time 1 every second; that would cancel out the countdown and give you another big counter, albiet with restrictions. could be useful for an engine, though.
User avatar
Ian Plastic
newcomer
Posts: 5
Joined: Sat Nov 17, 2007 10:49 pm

Post by Ian Plastic »

An RPG battle engine or some other one-board minigame, maybe. But the reason I asked in the first place was because I'm looking to make optimal use of as many universal (trans-board) counters as possible, so time doesn't interest me as much anymore. I'm sure I'll think of some place for it though.
Gobble Goo!
User avatar
Ian Plastic
newcomer
Posts: 5
Joined: Sat Nov 17, 2007 10:49 pm

Post by Ian Plastic »

Some food for thought, though. I believe that the countdown doesn't start if you mess with time.

I ran the following program:
#cycle 1
#give time 100
/i/i/i/i/i/i/i/i/i/i/i/i/i
#take time 99 bob
There is not a countdown.
#end
:bob
There is a countdown.
And it resulted in "There is not a countdown."
Gobble Goo!
User avatar
Commodore
fgsdfs
Posts: 2471
Joined: Wed Mar 12, 2003 5:44 pm
Location: :noitacoL
Contact:

Post by Commodore »

i'm not sure you could ever get a message to be sent using #take with the time counter. this is a guess.
*POW* *CLANK* *PING*
User avatar
Dr. Dos
OH YES! USE VINE WHIP! &lt;3
Posts: 1772
Joined: Tue Mar 11, 2003 12:00 am
Location: Washington

Post by Dr. Dos »

Maybe if you got the time over 32767.
Visit the Museum of ZZT
Follow Worlds of ZZT on Twitter

Apologies for the old post you may have just read.
gingermuffins
Posts: 371
Joined: Fri Sep 01, 2006 1:30 am

Post by gingermuffins »

the on enter trick uses '#take time 1 enteredboard' so it must work, only with a full counter instead of an empty one.
User avatar
Ian Plastic
newcomer
Posts: 5
Joined: Sat Nov 17, 2007 10:49 pm

Post by Ian Plastic »

You know what the enter board trick would be useful for?

If you wanted to play a short 5-second tune every time the player entered a city.
Gobble Goo!
User avatar
Kjorteo
^o.O^
Posts: 432
Joined: Sat Feb 28, 2004 10:59 am
Location: Kjorteoville or something
Contact:

Post by Kjorteo »

Actually, that's a really neat idea. I'd totally do that for Adventure of Sam if I knew the first thing about ZZT music.
"You're alive," said the maker, and smiled at the aardvark.

<Kjorteo> "yiff"
<gbelo> Wanna yiff.
<Kjorteo> yes
<gbelo> No no no.
Post Reply