Re: Warcraft II Mod Archive
Posted: Tue Apr 28, 2015 8:32 am
Thanks for your help, now i was able to convert some stuff for this archive, now i want to ask you something, how to allow fly unit "Gnomish inventor" based to attack...
Code: Select all
Missile = "missile-catapult-rock",
MinAttackRange = 2, MaxAttackRange = 8,
RightMouseAction = "attack",
CanGroundAttack = true,
CanAttack = true,
CanTargetLand = true, CanTargetSea = true,
Code: Select all
DefineUnitType("unit-fighter", { Name = "Fighter",
Image = {"file", "neutral/units/bomber.png", "size", {80, 80}},
Animations = "animations-balloon", Icon = "icon-gnomish-flying-machine",
Costs = {"time", 250, "gold", 2500},
Speed = 14,
HitPoints = 100,
DrawLevel = 60,
TileSize = {2, 2}, BoxSize = {71, 71},
SightRange = 6, ComputerReactionRange = 8, PersonReactionRange = 6,
Armor = 5, BasicDamage = 0, PiercingDamage = 16, Missile = "missile-catapult-rock",
MaxAttackRange = 4,
Priority = 65,
Points = 150,
Demand = 1,
Type = "fly", ShadowFly = {Value = 0, Enable = true},
RightMouseAction = "attack",
CanAttack = true,
CanTargetLand = true, CanTargetSea = true, CanTargetAir = true,
AirUnit = true,
DetectCloak = true,
organic = true,
SelectableByRectangle = true,
Sounds = {
"selected", "gnomish-flying-machine-selected",
"acknowledge", "gnomish-flying-machine-acknowledge",
"ready", "gnomish-flying-machine-ready",
"help", "basic human voices help 1",
"dead", "explosion"} } )
Code: Select all
DefineUnitType("unit-shaman", { Name = "Troll Shaman",
Image = {"file", "neutral/units/shaman.png", "size", {72, 72}},
Animations = "animations-sharp-axe", Icon = "icon-sharp-axe",
Costs = {"time", 70, "gold", 500, "wood", 50},
Speed = 10,
HitPoints = 120,
DrawLevel = 40,
Mana = {Enable = true},
TileSize = {1, 1}, BoxSize = {36, 36},
SightRange = 9, ComputerReactionRange = 7, PersonReactionRange = 5,
Armor = 5, BasicDamage = 10, PiercingDamage = 18, Missile = "missile-axe",
MaxAttackRange = 5,
Priority = 55,
Points = 120,
Demand = 1,
Corpse = "unit-orc-dead-body",
Type = "land",
RightMouseAction = "attack",
CanAttack = true,
CanTargetLand = true, CanTargetSea = true, CanTargetAir = true,
CanCastSpell = {
"spell-death-coil",
"spell-haste",
"spell-raise-dead"},
LandUnit = true,
hero = true,
organic = true,
SelectableByRectangle = true,
Sounds = {
"selected", "zuljin-selected",
"acknowledge", "zuljin-acknowledge",
-- "ready", "zuljin-ready",
"help", "basic orc voices help 1",
"dead", "basic orc voices dead"} } )
Code: Select all
DefineAnimations("animations-balloon", {
Still = {"frame 0", "wait 1", "frame 5", "wait 1", "frame 5", "wait 1",
"frame 0", "wait 1", },
Move = {"unbreakable begin", "frame 5", "move 4", "wait 1", "frame 5", "move 3", "wait 1",
"frame 5", "move 3", "wait 1", "frame 0", "move 3", "wait 1",
"frame 0", "move 3", "wait 1", "frame 5", "move 4", "wait 1",
"frame 5", "move 3", "wait 1", "frame 5", "move 3", "wait 1",
"frame 0", "move 3", "wait 1", "frame 0", "move 3", "unbreakable end", "wait 1", },
Attack = {"unbreakable begin", "frame 0", "unbreakable end", "wait 1", },
Death = {"unbreakable begin", "frame 0", "unbreakable end", "wait 1", },
})
Code: Select all
DefineAnimations("animations-balloon", {
Still = {"frame 0", "wait 1", "frame 5", "wait 1", "frame 5", "wait 1",
"frame 0", "wait 1", },
Move = {"unbreakable begin", "frame 5", "move 4", "wait 1", "frame 5", "move 3", "wait 1",
"frame 5", "move 3", "wait 1", "frame 0", "move 3", "wait 1",
"frame 0", "move 3", "wait 1", "frame 5", "move 4", "wait 1",
"frame 5", "move 3", "wait 1", "frame 5", "move 3", "wait 1",
"frame 0", "move 3", "wait 1", "frame 0", "move 3", "unbreakable end", "wait 1", },
Attack = {"unbreakable begin",
"frame 0", "wait 3", --aim
"frame 0", "attack", "sound catapult-attack", "wait 5", --attack
"frame 0", "wait 5", -- cooldown
"frame 0", "unbreakable end", "wait 1", },
Death = {"unbreakable begin", "frame 0", "unbreakable end", "wait 1", },
})
Code: Select all
"sound catapult-attack",