Directions:
1)Make a board with random walls all over the place
2)Put a bunch of objects on the board with this code:
[start of code]
@scared
#cycle 1
:loop
/opp seek
#if alligned if blocked e /rnd
#if alligned if blocked w /rnd
#if alligned if blocked n /rnd
#if alligned if blocked s /rnd
#if blocked w if blocked n /rnd
#if blocked w if blocked s /rnd
#if blocked e if blocked n /rnd
#if blocked e if blocked s /rnd
#loop
:touch
#become red fake
[end of code]
Watch as you see how hard some of them are to catch because of this advanced AI.
Advanced running object
Moderators: Commodore, Zenith Nadir
Advanced running object
╟ is the best char.
Don't forget that /rnd is more likely to go east/west than it is north/south. For 'pure' random movement, you'd need /rndp rndne. It'd also probably be better to replace the slashes with question marks for a TRY command, so that the object doesn't stall if it's blocked in the random direction it moves.Jotz wrote:The /rnd for all of them create a more life-like run away movement so they're harder to catch. And the #if alligned codes are for if the object is blocked in the direction its running from you. The #if blocked codes are for when the object is trapped in a corner.
- Dr. Dos
- OH YES! USE VINE WHIP! <3
- Posts: 1772
- Joined: Tue Mar 11, 2003 12:00 am
- Location: Washington
MadTom is PERFECT.
Saying that makes him sad :\
Saying that makes him sad :\
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.
-
- LOOK OUT FER BAAAD BOB
- Posts: 116
- Joined: Fri Mar 28, 2003 12:51 am