My LD22 entry — Everybody Wants You

I probably won’t get this entered in to be judged,  but we’ll see.  It took me 3 hours to get that little pink block to move around, that’s because I was building sort of a scripting language, you might say (yes in AS3)

http://www.gamesafoot.com/wp-content/uploads/2011/12/EverybodyWantsYou1.swf

Anyways I think the “script” code is kind of neat —
npc01 = new CNonPlayerEntity(11 * 8, 8 * 8);
npc01.patrolScript.push(new CPatrolCommand("east", 3, 6));
npc01.patrolScript.push(new CPatrolCommand("wait", 1));
npc01.patrolScript.push(new CPatrolCommand("south", 3, 5));
npc01.patrolScript.push(new CPatrolCommand("wait", 1));
npc01.patrolScript.push(new CPatrolCommand("west", 3, 6));
npc01.patrolScript.push(new CPatrolCommand("wait", 1));
npc01.patrolScript.push(new CPatrolCommand("north", 3, 5));
npc01.patrolScript.push(new CPatrolCommand("wait", 1));
npc01.QueueNextPatrolState();
add(npc01);

It may not be brilliant to you, but to me it’s pretty neat. Basically the only commands or directions it recognizes right now are north, south, east, and west, as well as wait. second command after wait is the wait time in seconds, otherwise it’s a measure of speed, the third command is distance in tiles. You want it to move back to the original position, you need to use the same distance as you did when you got there. this makes one complete circle. before starting all over again.