Code: Select all
class FrogBoots extends Inventory {
set Inventory.MaxAmount to 1;
}
class Tired extends Inventory {
set Inventory.MaxAmount to 3;
}
class FrogZombie extends ZombieMan replaces ZombieMan {
condition<Offset> C_HasInventory(InventoryName, Amount = 1) {
TNT1 A 0 A_JumpIfInventory(InventoryName, Amount, Offset);
}
condition<Offset> C_Closer(Distance) {
A_JumpIfCloser(Distance, Offset);
}
condition<Offset> C_OnFloor() {
A_JumpIf(z < floor + 1, Offset);
}
label Spawn {
TNT1 A 0;
TNT1 A 0 A_Give("FrogBoots");
goto Super.Spawn;
}
macro Jump {
TNT1 A 0 {
A_FaceTarget();
ThrustThingZ(0, 30, 0, 0);
ThrustThing(angle * 256 / 360, 25, 1, 0);
}
}
label See {
if (HasInventory("Tired")) POSS ABCD 10 A_Chase;
else POSS ABCD 4 A_Chase;
sometimes 15 if (C_HasInventory("FrogBoots") && !C_Closer(128) && !C_HasInventory("Tired", 3) && C_OnFloor()) {
TNT1 A 0 {
A_Give("Tired", 1);
inject Jump;
};
}
sometimes 20 TNT1 A 0 A_Take("Tired", 1);
loop;
}
}
What exactly do you mean frame information?CBM wrote:anything in zcode II that will make generation of actors based soly on frame information very easy?
Also, a complete specification & documentation of the language is still in the todo list. I haven't gotten to do it yet.