Code: Select all
-- any slime
local SlimeStill = {"unbreakable begin",
"frame 0", "move 3", "wait 2",
"frame 0", "move 3", "wait 2",
"frame 5", "move 4", "wait 2",
"frame 5", "move 3", "wait 1",
"frame 10", "move 3", "wait 2",
"frame 10", "move 3", "wait 1",
"frame 15", "move 3", "wait 2",
"frame 15", "move 3", "wait 1",
"frame 20", "move 4", "wait 2",
"frame 20", "move 3", "unbreakable end", "wait 1",}
local SlimeMove = {"unbreakable begin",
"frame 30", "move 3", "wait 2",
"frame 30", "move 3", "wait 2",
"frame 35", "move 4", "wait 2",
"frame 35", "move 3", "wait 1",
"frame 40", "move 3", "wait 2",
"frame 40", "move 3", "wait 1",
"frame 45", "move 3", "wait 2",
"frame 45", "move 3", "wait 1",
"frame 50", "move 4", "wait 2",
"frame 50", "move 3", "wait 2",
"frame 0", "move 0", "wait 2",
"frame 0", "move 0", "wait 2",
"frame 5", "move 0", "wait 2",
"frame 5", "move 0", "wait 1",
"frame 10", "move 0", "wait 2",
"frame 10", "move 0", "wait 1",
"frame 15", "move 0", "wait 2",
"frame 15", "move 0", "wait 1",
"frame 20", "move 0", "wait 2",
"frame 20", "move 0", "wait 2",
"frame 0", "move 0", "wait 2",
"frame 0", "move 0", "wait 2",
"frame 5", "move 0", "wait 2",
"frame 5", "move 0", "wait 1",
"frame 10", "move 0", "wait 2",
"frame 10", "move 0", "wait 1",
"frame 15", "move 0", "wait 2",
"frame 15", "move 0", "wait 1",
"frame 20", "move 0", "wait 2",
"frame 20", "move 0", "unbreakable end", "wait 1",}
local SlimeDeath = {"unbreakable begin",
"frame 70", "wait 26",
"frame 75", "wait 25",
"frame 80", "wait 25",
"frame 85", "wait 25",
"frame 90", "wait 50",
"frame 90", "unbreakable end", "wait 1",}
DefineAnimations("animations-slime", {
Still = SlimeStill,
Move = SlimeMove,
Attack = {"unbreakable begin",
"frame 55", "wait 3",
"frame 55", "wait 3",
"frame 60", "wait 3",
"frame 60", "attack", "sound punch", "wait 5",
"frame 65", "wait 5",
"frame 65", "wait 5",
"frame 0", "wait 2",
"frame 0", "wait 2",
"frame 5", "wait 2",
"frame 5", "wait 1",
"frame 10", "wait 2",
"frame 10", "wait 1",
"frame 15", "wait 2",
"frame 15", "wait 1",
"frame 20", "wait 2",
"frame 20", "wait 2",
"frame 0", "unbreakable end", "wait 1",},
Death = SlimeDeath,
})
Code: Select all
DefineUnitType("unit-greenslime", { Name = "Green Slime",
Image = {"file", "wip/neutral/units/green.png", "size", {32, 32}},
Animations = "animations-slime", Icon = "icon-greenslime",
Costs = {"time", 70, "gold", 500, "wood", 50},
Speed = 8,
HitPoints = 100,
DrawLevel = 15,
TileSize = {1, 1}, BoxSize = {31, 31},
SightRange = 3, ComputerReactionRange = 3, PersonReactionRange = 3,
Armor = 5, BasicDamage = 1, PiercingDamage = 0, Missile = "missile-none",
MaxAttackRange = 1,
Priority = 50,
DecayRate = 100,
Points = 100,
Demand = 1,
Type = "land",
RightMouseAction = "attack",
CanAttack = true,
CanTargetLand = true,
LandUnit = true,
organic = true,
SelectableByRectangle = true,
Sounds = {
"selected", "skeleton-selected"--,
} } )