Page 1 of 1

More ZZT-OOP codes.

Posted: Sat Oct 18, 2003 3:22 pm
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?

Posted: Sat Oct 18, 2003 3:36 pm
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!

Posted: Sat Oct 18, 2003 5:27 pm
by clecky
Or, if you still dont understand use the help file in ZZT by going into edit mode and pressing "h".

Posted: Sat Oct 18, 2003 7:56 pm
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

Posted: Sat Oct 18, 2003 8:22 pm
by clecky
Quite the long signature there EH, DAVEW27?

Posted: Sat Oct 18, 2003 9:58 pm
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.

Posted: Sun Oct 19, 2003 9:53 am
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?

Posted: Sun Oct 19, 2003 1:56 pm
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.

Posted: Sun Oct 19, 2003 6:52 pm
by Ryan Ferneau
Or maybe Davey has just discovered a way to make objects seek each other! Hooray!

Posted: Mon Oct 20, 2003 12:05 am
by My Liver Hurtz
/me prays that such a thing were possible

Posted: Mon Oct 20, 2003 4:42 am
by superbowl shuffle
I did it but it required two counters and had it's problems. But I did it.

Posted: Mon Oct 20, 2003 4:51 am
by Zephyr
Cue "I MUST KNOW NOW" spamming.

Posted: Mon Oct 20, 2003 9:34 am
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).

Posted: Tue Oct 21, 2003 9:56 am
by 446

Posted: Tue Oct 21, 2003 3:54 pm
by 53
What???
large pict, please remove