More ZZT-OOP codes.

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

Moderators: Commodore, Zenith Nadir

Post Reply
446
What can be said now?
Posts: 0
Joined: Sun Oct 12, 2003 5:07 pm

More ZZT-OOP codes.

Post by 446 »

There are still four things I can't work out:
1: How to make a working fade in/out.
2: How to make flashing objects.
3: How the #put command works.
4: How the #send command works.
Will anyone help?
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 »

1.

Suppose you want all the red walls on a board to fade in and out in sync.

@supercharger hell
#cycle 1
:hrr
/i#change red solid normal
/i#change red normal breakable
/i#change red breakable water
/i#change red water invisible
/i#change red invisible water
/i#change red water breakable
/i#change red breakable normal
/i#change red normal solid
#hrr

2.

Flashing objects are available in <a href="http://zzt.org/?p=reviews ... ip">STK</a> and <a href="http://zzt.org/?p=reviews ... s24.zip">a whole bunch of toolkits</a>. You can't "make" them outside of it unless you're using ZZTAE or KevEdit, and you can't make an object #become one.

3.

Easy, the #put command makes an object put whatever you specify in whatever direction you specify. Say, you want an object to put a green gem to its right;

#put e green gem

Or, if you want to use a direction relative to the player,

#put seek green gem
OR
#put opp seek green gem
OR
#put cw seek green gem.

You can #put pretty much any pre-programmed item, terrain or creature.

4. The #send command makes objects interact with one another. for example, say you have two objects, "dog" and "cat", and you want one to react to an event that happens to the other.

@dog
#cycle 1
#end
:touch
DOG: Woof!
#lock (this makes it so the player cannot touch the dog and restart its routine)
/i/i/i/i/i/i (this causes a short pause, making things look a little more realistic)
#send cat:ahh (the #send is actually superfluous- you can just use "#cat:ahh" and it'll have the same effect)
#unlock (reverses effect of #lock command)
#end

@cat
#cycle 1
#end
:ahh
#lock
CAT: OH GOD IT'S COMING TO GET ME GHFGFDHGBGHRS f
/i/i/i?rnd?rnd?rnd?rnd?rnd?rnd?rnd?rnd
CAT: Wait, nevermind.
#unlock
#end

Hope that helps!
he looked upon the world and saw it was still depraved :fvkk:

Overall: Rotton egg for breakfast
User avatar
clecky
Founder of Scientology
Posts: 18
Joined: Sun Mar 16, 2003 12:59 am
Location: ns, canada
Contact:

Post by clecky »

Or, if you still dont understand use the help file in ZZT by going into edit mode and pressing "h".
446
What can be said now?
Posts: 0
Joined: Sun Oct 12, 2003 5:07 pm

Post by 446 »

1: It works!
2: How do you get it to flash objects like the text at the bottom of the screen flashes?
3: It Works!
4: It Works too.

Yay!
/
:D
User avatar
clecky
Founder of Scientology
Posts: 18
Joined: Sun Mar 16, 2003 12:59 am
Location: ns, canada
Contact:

Post by clecky »

Quite the long signature there EH, DAVEW27?
"Reefer makes darkies think they're as good as white men." Harry J. Anslinger, 1929
Ryan Ferneau
LOOK OUT FER BAAAD BOB
Posts: 116
Joined: Fri Mar 28, 2003 12:51 am

Post by Ryan Ferneau »

DAVEW27 wrote:2: How do you get it to flash objects like the text at the bottom of the screen flashes?
You'll have to do that artificially. "#become red object" doesn't work in ZZT, so you'll either have to put an object next to it that says ":loop #put w red object #put w purple object #put w yellow object #put w white object #put w blue object #put w green object #put w cyan object #loop", or have the object say ":loop #change cyan object red object #change red object purple object #change purple object yellow object #change yellow object white object #change white object blue object #change blue object green object #change green object cyan object #loop", which would soon affect all the bright objects on the screen.

And if you want to simulate blinking objects without the actual blinking color, you can just have your object alternate between "#char 32" and "#char [whatever number the object started at]".

But I recommend you figure out your own special ZZT techniques.
446
What can be said now?
Posts: 0
Joined: Sun Oct 12, 2003 5:07 pm

Post by 446 »

How do you get an object to seek the player?
I put in a command for object#1 so if you touch it, it would #send a #go seek & #shoot seek command to object#2. But when it sends the command, object#2 seeks object#1. How do I fix that?
User avatar
clecky
Founder of Scientology
Posts: 18
Joined: Sun Mar 16, 2003 12:59 am
Location: ns, canada
Contact:

Post by clecky »

Are you sure about that? Objects can't seek each other. Maybe you were close to the object that it looks like it was seeking.
"Reefer makes darkies think they're as good as white men." Harry J. Anslinger, 1929
Ryan Ferneau
LOOK OUT FER BAAAD BOB
Posts: 116
Joined: Fri Mar 28, 2003 12:51 am

Post by Ryan Ferneau »

Or maybe Davey has just discovered a way to make objects seek each other! Hooray!
User avatar
My Liver Hurtz
All Hail
Posts: 15
Joined: Sun May 11, 2003 1:31 pm
Location: Ottawa, Canada
Contact:

Post by My Liver Hurtz »

/me prays that such a thing were possible
I did!--I did!--You're quicker than your friend... Now for a handful of guilders I happen to have a private and uncut performance of The Rape of the Sabine Women-or rather woman, or rather Alfred--. Get your skirt on, Alfred--
User avatar
superbowl shuffle
Official Clamp School Defender
Posts: 418
Joined: Mon Apr 07, 2003 4:52 am
Location: CAsE SenSiTiVe

Post by superbowl shuffle »

I did it but it required two counters and had it's problems. But I did it.
[size=75:lh51rn9h][b:lh51rn9h]When the 5 o'clock whistle blows, so do I.[/b:lh51rn9h]
[/size:lh51rn9h]
User avatar
Zephyr
aaaa my capilaries
Posts: 129
Joined: Sat Jul 26, 2003 11:12 pm

Post by Zephyr »

Cue "I MUST KNOW NOW" spamming.
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 »

/seek or ?seek make an object seek the player.

You can't (or at least, it's totally difficult to) make an object seek another, although it is possible to have objects "touch" each other (eg. the platform level at the end of Fantasy World Dizzy).
he looked upon the world and saw it was still depraved :fvkk:

Overall: Rotton egg for breakfast
446
What can be said now?
Posts: 0
Joined: Sun Oct 12, 2003 5:07 pm

Post by 446 »

53
What can be said now?
Posts: 0
Joined: Tue Mar 11, 2003 6:14 pm

Post by 53 »

What???
large pict, please remove
Post Reply