Random Unit Appearances Issue
I am having a problem when trying to give unit types random appearances based on unit variables. For most things, it works fine, but when the unit is walking and its path is blocked, it simply uses the first frame in the still animation, regardless of the setup of the animation. Is there a way to solve this issue?
This is the animation code that I am using:
--
-- Dwarven Scout
--
local ScoutStill = {
"if-var v.GraphicsVaria
"if-var v.GraphicsVaria
"if-var v.GraphicsVaria
"label variation_1", "frame 0", "goto end",
"label variation_2", "frame 60", "goto end",
"label variation_3", "frame 120", "goto end",
"label end", "wait 4", "random-goto 99 no-rotate", "random-rotate 1", "label no-rotate", "wait 1",}
local ScoutDeath = {"unbreakable begin", "frame 45", "wait 3", "frame 50", "wait 3", "frame 55", "wait 100",
"frame 55", "unbreakable end", "wait 1",}
DefineAnimation
Still = ScoutStill,
Move = {"unbreakable begin",
"if-var v.GraphicsVaria
"if-var v.GraphicsVaria
"if-var v.GraphicsVaria
"label variation_1", "frame 0", "move 3", "wait 2", "frame 5", "move 3", "wait 1",
"frame 5", "move 3", "wait 2", "frame 10", "move 2", "wait 1",
"frame 10", "move 3", "wait 1", "frame 0", "move 2", "wait 1",
"frame 0", "move 3", "wait 2", "frame 15", "move 3", "wait 1",
"frame 15", "move 3", "wait 2", "frame 20", "move 2", "wait 1",
"frame 20", "move 3", "wait 1", "frame 0", "move 2", "goto end",
"label variation_2", "frame 60", "move 3", "wait 2", "frame 65", "move 3", "wait 1",
"frame 65", "move 3", "wait 2", "frame 70", "move 2", "wait 1",
"frame 70", "move 3", "wait 1", "frame 60", "move 2", "wait 1",
"frame 60", "move 3", "wait 2", "frame 75", "move 3", "wait 1",
"frame 75", "move 3", "wait 2", "frame 80", "move 2", "wait 1",
"frame 80", "move 3", "wait 1", "frame 60", "move 2", "goto end",
"label variation_3", "frame 120", "move 3", "wait 2", "frame 125", "move 3", "wait 1",
"frame 125", "move 3", "wait 2", "frame 130", "move 2", "wait 1",
"frame 130", "move 3", "wait 1", "frame 120", "move 2", "wait 1",
"frame 120", "move 3", "wait 2", "frame 135", "move 3", "wait 1",
"frame 135", "move 3", "wait 2", "frame 140", "move 2", "wait 1",
"frame 140", "move 3", "wait 1", "frame 120", "move 2", "goto end",
"label end", "unbreakable end", "wait 1",},
Attack = {"unbreakable begin",
"if-var v.GraphicsVaria
"if-var v.GraphicsVaria
"if-var v.GraphicsVaria
"label variation_1", "frame 0", "move 3", "wait 2", "frame 5", "move 3", "wait 1",
"frame 25", "wait 3", "frame 30", "wait 3", "frame 35", "wait 3",
"frame 40", "attack", "sound throwing-axe", "wait 12",
"frame 0", "wait 52", "frame 0",
"label variation_2", "frame 60", "move 3", "wait 2", "frame 65", "move 3", "wait 1",
"frame 85", "wait 3", "frame 90", "wait 3", "frame 95", "wait 3",
"frame 100", "attack", "sound throwing-axe", "wait 12",
"frame 60", "wait 52", "frame 60",
"label variation_3", "frame 120", "move 3", "wait 2", "frame 125", "move 3", "wait 1",
"frame 145", "wait 3", "frame 150", "wait 3", "frame 155", "wait 3",
"frame 160", "attack", "sound throwing-axe", "wait 12",
"frame 120", "wait 52", "frame 120",
"label end", "unbreakable end", "wait 1",},
Death = ScoutDeath,
})
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Stratagus Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Andre Novellino Gouvêa
- Solved:
- Last query:
- Last reply: