From a67d1f0824cd310b8ff40f67ae332867b63d2c59 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 7 Aug 2021 13:36:13 +0200 Subject: [PATCH] feat: add actor targeting for choregraphy movement --- .../datas/gamedata/ennemies/skills/tackle.lua | 6 ++--- .../datas/gamedata/skills/attack.lua | 14 +++++----- .../datas/gamedata/skills/hitcombo.lua | 26 +++++++++--------- .../datas/gamedata/skills/homming.lua | 18 ++++++------- .../datas/gamedata/skills/spindash.lua | 18 ++++++------- .../datas/gamedata/skills/useitem.lua | 12 ++++----- .../datas/parsers/choregraphystep.lua | 16 +++++------ .../fighters/systems/choregraphy/init.lua | 10 +++++++ .../systems/choregraphy/step/goTo.lua | 9 ++++--- .../systems/choregraphy/step/goTo3D.lua | 9 ++++--- .../systems/choregraphy/step/jump.lua | 8 +++--- .../systems/choregraphy/step/jumpBack.lua | 7 ++--- .../systems/choregraphy/step/parent.lua | 27 ++++++++++++------- .../systems/choregraphy/step/setAnimSpeed.lua | 4 ++- .../systems/choregraphy/step/setAnimation.lua | 8 +++--- .../systems/choregraphy/step/stopMov.lua | 4 ++- 16 files changed, 112 insertions(+), 84 deletions(-) diff --git a/sonic-radiance.love/datas/gamedata/ennemies/skills/tackle.lua b/sonic-radiance.love/datas/gamedata/ennemies/skills/tackle.lua index ade250b..de26f55 100644 --- a/sonic-radiance.love/datas/gamedata/ennemies/skills/tackle.lua +++ b/sonic-radiance.love/datas/gamedata/ennemies/skills/tackle.lua @@ -13,13 +13,13 @@ return { isSpecial = false, choregraphy = { -- the main attack choregraphy - {"goTo3D", "none", "target", -0.4, 0, 0, 0.5, true}, + {"goTo3D", "none", "actor", "target", -0.4, 0, 0, 0.5, true}, {"sendDamage", "none", 120, "basic", "none", false}, {'addGFX', "sentDamage", 'hitGFX', "target", -0.4, 0, 0, true, false}, {'playSFX', "sentDamage", 'hitconnect'}, - {'jumpBack', "none", 4, 8, true}, + {'jumpBack', "none", "actor", 4, 8, true}, {"wait", "none", 0.1}, - {'goTo3D', "none", "start", 0, 0, 0, 0.3, true}, + {'goTo3D', "none", "actor", "start", 0, 0, 0, 0.3, true}, }, onContact = { -- if the attack move and touch multiple ennemies, you can add diff --git a/sonic-radiance.love/datas/gamedata/skills/attack.lua b/sonic-radiance.love/datas/gamedata/skills/attack.lua index f7b58d9..804544e 100644 --- a/sonic-radiance.love/datas/gamedata/skills/attack.lua +++ b/sonic-radiance.love/datas/gamedata/skills/attack.lua @@ -14,20 +14,20 @@ return { targetEnnemies = true, choregraphy = { -- the main attack choregraphy - {"setAnimation", "none", "walk", false}, - {"taggedAction", "playerMove", {"goTo", "none", "target", 0, 0, 0.6, false}}, + {"setAnimation", "none", "actor", "walk", false}, + {"taggedAction", "playerMove", {"goTo", "none", "actor", "target", 0, 0, 0.6, false}}, {"wait", "none", 0.3}, - {"setAnimation", "none", "spin", false}, + {"setAnimation", "none", "actor", "spin", false}, {'playSFX', "none", 'spinrelease'}, {"waitFor", "none", "actionFinished:playerMove"}, {"sendDamage", "none", 100, "basic", "none", false}, {'addGFX', "sentDamage", 'hitGFX', "target", 0, 0, 0, true, false}, {'playSFX', "sentDamage", 'hitconnect'}, - {'jumpBack', "none", 4, 8, true}, + {'jumpBack', "none", "actor", 4, 8, true}, {"wait", "none", 0.1}, - {"setAnimation", "none", "walk", false}, - {'goTo', "none", "start", 0, 0, 0.3, true}, - {'setAnimation', "none", 'idle', false}, + {"setAnimation", "none", "actor", "walk", false}, + {'goTo', "none", "actor", "start", 0, 0, 0.3, true}, + {'setAnimation', "none", "actor", 'idle', false}, }, onContact = { -- if the attack move and touch multiple ennemies, you can add diff --git a/sonic-radiance.love/datas/gamedata/skills/hitcombo.lua b/sonic-radiance.love/datas/gamedata/skills/hitcombo.lua index f6e0538..47b9ea2 100644 --- a/sonic-radiance.love/datas/gamedata/skills/hitcombo.lua +++ b/sonic-radiance.love/datas/gamedata/skills/hitcombo.lua @@ -14,45 +14,45 @@ return { targetEnnemies = true, choregraphy = { -- the main attack choregraphy - {"setAnimation", "none", "walk", false}, - {'goTo', "none", "target", -1, 0, 0.3, false}, + {"setAnimation", "none", "actor", "walk", false}, + {'goTo', "none", "actor", "target", -1, 0, 0.3, false}, {"wait", "none", 0.15}, {"taggedAction", "comboQte", {"addQTE", "none", {"simplePrompt", {{"A", 1}, {"A", 1}, {"B", 1}}, 0.5}, "target", false}}, {"wait", "none", 0.15}, {'playSFX', "none", 'hit'}, - {'setAnimation', "none", 'hit1start', true}, + {'setAnimation', "none", "actor", 'hit1start', true}, {'sendDamage', "none", 40, "basic", "none", false}, {'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, 0, true, false}, {'playSFX', "sentDamage", 'hitconnect'}, - {'setAnimation', "none", 'hit1end', true}, + {'setAnimation', "none", "actor", 'hit1end', true}, {'playSFX', "none", 'hit'}, - {'setAnimation', "none", 'hit2start', true}, + {'setAnimation', "none", "actor", 'hit2start', true}, {'sendDamage', "none", 40, "basic", "none", false}, {'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, 0, true, false}, {'playSFX', "sentDamage", 'hitconnect'}, - {'setAnimation', "none", 'hit2end', true}, + {'setAnimation', "none", "actor", 'hit2end', true}, {'playSFX', "none", 'hit'}, - {'setAnimation', "none", 'hit3start', true}, + {'setAnimation', "none", "actor", 'hit3start', true}, {'sendDamage', "none", 40, "basic", "none", false}, {'addGFX',"sentDamage", 'hitGFX', "actor", 0.75, 0, 0, true, false}, {'playSFX', "sentDamage", 'hitconnect'}, - {'setAnimation', "none", 'hit3end', true}, - {'setAnimation', "none", 'idle', false}, + {'setAnimation', "none", "actor", 'hit3end', true}, + {'setAnimation', "none", "actor", 'idle', false}, {'waitFor', "none", "actionFinished:comboQte"}, - {"setAnimation", "qteSuccess:1", "upper", false}, + {"setAnimation", "qteSuccess:1", "actor", "upper", false}, {"waitFor", "qteSuccess:1", "haveFrameSignal:hitconnect"}, {'sendDamage', "qteSuccess:1", 75, "basic", "none", false}, {'addGFX', {"qteSuccess:1", "sentDamage"}, 'hitGFX', "actor", 0.75, 0, 0, true, false}, {'playSFX', {"qteSuccess:1", "sentDamage"}, 'hitconnect'}, {'wait', "none", 0.2}, - {"setAnimation", "none", "walk", false}, - {'goTo', "none", "start", 0, 0, 0.3, true}, - {'setAnimation', "none", 'idle', false}, + {"setAnimation", "none", "actor", "walk", false}, + {'goTo', "none", "actor", "start", 0, 0, 0.3, true}, + {'setAnimation', "none", "actor", 'idle', false}, }, onContact = { -- if the attack move and touch multiple ennemies, you can add diff --git a/sonic-radiance.love/datas/gamedata/skills/homming.lua b/sonic-radiance.love/datas/gamedata/skills/homming.lua index dc080a8..e5a86f3 100644 --- a/sonic-radiance.love/datas/gamedata/skills/homming.lua +++ b/sonic-radiance.love/datas/gamedata/skills/homming.lua @@ -14,21 +14,21 @@ return { targetEnnemies = true, choregraphy = { -- the main attack choregraphy - {"setAnimation", "none", "walk", false}, - {'goTo', "none", "start", 5, 0, 0.5, true}, - {"taggedAction", "jumpingHero", {'jump', "none", 5.5, true, false}}, + {"setAnimation", "none", "actor", "walk", false}, + {'goTo', "none", "actor", "start", 5, 0, 0.5, true}, + {"taggedAction", "jumpingHero", {'jump', "none", "actor", 5.5, true, false}}, {"taggedAction", "hommingQte", {"addQTE", "none", {"simplePrompt", {{"A", 1}}, 0.4}, "target", false}}, {"waitFor", "none", "actionFinished:hommingQte"}, - {"taggedAction", "dashToEnnemy", {"goTo3D", "none", "target", 0, 0, 8, 0.2, false}}, + {"taggedAction", "dashToEnnemy", {"goTo3D", "none", "actor", "target", 0, 0, 8, 0.2, false}}, {'addGFX', "none", 'hommingGFX', "actor", 0, 0, -4, true, false}, - {"setAnimation", "none", "spin", false}, + {"setAnimation", "none", "actor", "spin", false}, {'playSFX', "none", 'spinrelease'}, {"waitFor", "none", "actionFinished:dashToEnnemy"}, {"sendDamage", "none", 30, "aerial", "none", false}, {'addGFX', "sentDamage", 'hitGFX', "target", 0, 0, 4, true, false}, {'playSFX', "sentDamage", 'hitconnect'}, - {"taggedAction", "jumpingHero", {'jumpBack', "none", 5.5, 5.5, false}}, + {"taggedAction", "jumpingHero", {'jumpBack', "none", "actor", 5.5, 5.5, false}}, {"wait", "none", 0.1}, {"setCounter", "none", "spinSpam", 1, true}, @@ -37,9 +37,9 @@ return { {"skipTo", {"counter:spinSpam:lt:5", "qteSuccess"}, "dashToEnnemy"}, {"waitFor", "none", "actionFinished:jumpingHero"}, - {"setAnimation", "none", "walk", false}, - {'goTo', "none", "start", 0, 0, 0.3, true}, - {'setAnimation', "none", 'idle', false}, + {"setAnimation", "none", "actor", "walk", false}, + {'goTo', "none", "actor", "start", 0, 0, 0.3, true}, + {'setAnimation', "none", "actor", 'idle', false}, }, onContact = { -- if the attack move and touch multiple ennemies, you can add diff --git a/sonic-radiance.love/datas/gamedata/skills/spindash.lua b/sonic-radiance.love/datas/gamedata/skills/spindash.lua index 875d37b..ceb304e 100644 --- a/sonic-radiance.love/datas/gamedata/skills/spindash.lua +++ b/sonic-radiance.love/datas/gamedata/skills/spindash.lua @@ -6,21 +6,21 @@ return { targetNumber = 1, -- 0 for targeting all ennemies targetEnnemies = true, choregraphy = { - {"setAnimation", "none", "walk", false}, - {'goTo', "none", "start", 2, 0, 0.5, true}, - {"setAnimation", "none", "spindash", false}, + {"setAnimation", "none", "actor", "walk", false}, + {'goTo', "none", "actor", "start", 2, 0, 0.5, true}, + {"setAnimation", "none", "actor", "spindash", false}, {'playSFX', "none", 'spincharge'}, {"wait", "none", 1}, - {"setAnimation", "none", "spin", false}, + {"setAnimation", "none", "actor", "spin", false}, {'playSFX', "none", 'spinrelease'}, - {"goTo", "none", "target", 0, 0, 0.3, true}, + {"goTo", "none", "actor", "target", 0, 0, 0.3, true}, {"sendDamage", "none", 120, "basic", "none", false}, {'addGFX', "sentDamage", 'hitGFX', "target", 0, 0, 0, true, false}, {'playSFX', "sentDamage", 'hitconnect'}, - {'jumpBack', "none", 4, 8, true}, + {'jumpBack', "none", "actor", 4, 8, true}, {"wait", "none", 0.1}, - {"setAnimation", "none", "walk", false}, - {'goTo', "none", "start", 0, 0, 0.3, true}, - {'setAnimation', "none", 'idle', false}, + {"setAnimation", "none", "actor", "walk", false}, + {'goTo', "none", "actor", "start", 0, 0, 0.3, true}, + {'setAnimation', "none", "actor", 'idle', false}, } } diff --git a/sonic-radiance.love/datas/gamedata/skills/useitem.lua b/sonic-radiance.love/datas/gamedata/skills/useitem.lua index 6106f71..48b668d 100644 --- a/sonic-radiance.love/datas/gamedata/skills/useitem.lua +++ b/sonic-radiance.love/datas/gamedata/skills/useitem.lua @@ -12,16 +12,16 @@ return { targetNumber = 1, -- 0 for targeting all ennemies choregraphy = { -- the main attack choregraphy - {"setAnimation", "none", "walk", false}, - {'goTo', "none", "start", 2, 0, 0.5, true}, + {"setAnimation", "none", "actor", "walk", false}, + {'goTo', "none", "actor", "start", 2, 0, 0.5, true}, - {'setAnimation', "none", 'idle', false}, + {'setAnimation', "none", "actor", 'idle', false}, {'wait', "none", 0.4}, {'useItemEffect', "none"}, - {"setAnimation", "none", "walk", false}, - {'goTo', "none", "start", 0, 0, 0.5, true}, - {'setAnimation', "none", 'idle', false}, + {"setAnimation", "none", "actor", "walk", false}, + {'goTo', "none", "actor", "start", 0, 0, 0.5, true}, + {'setAnimation', "none", "actor", 'idle', false}, }, onContact = { -- if the attack move and touch multiple ennemies, you can add diff --git a/sonic-radiance.love/datas/parsers/choregraphystep.lua b/sonic-radiance.love/datas/parsers/choregraphystep.lua index cb92c48..57a6755 100644 --- a/sonic-radiance.love/datas/parsers/choregraphystep.lua +++ b/sonic-radiance.love/datas/parsers/choregraphystep.lua @@ -5,20 +5,20 @@ return { ["addGFX"] = {'sprite', "origin", "x", "y", "z", "affectedByDirection", 'blockProcess'}, ["playSFX"] = {"sfx"}, ["sendDamage"] = {"power", "type", "element", "isSpecial"}, - ["goTo"] = {"origin", "x", "y", "duration", "blockProcess"}, - ["goTo3D"] = {"origin", "x", "y", "z", "duration", "blockProcess"}, - ["setAnimation"] = {"animation", "blockProcess"}, - ["jump"] = {"power", "useDefaultAnimation", "blockProcess"}, - ["jumpTo"] = {"origin", "x", "y", "duration", "blockProcess"}, - ["jumpBack"] = {"height", "speed", "blockProcess"}, + ["goTo"] = {"who", "origin", "x", "y", "duration", "blockProcess"}, + ["goTo3D"] = {"who", "origin", "x", "y", "z", "duration", "blockProcess"}, + ["setAnimation"] = {"who", "animation", "blockProcess"}, + ["jump"] = {"who", "power", "useDefaultAnimation", "blockProcess"}, + ["jumpTo"] = {"who", "origin", "x", "y", "duration", "blockProcess"}, + ["jumpBack"] = {"who", "height", "speed", "blockProcess"}, ["waitActorFinished"] = {"waitFor"}, - ["setAnimSpeed"] = {"speed"}, + ["setAnimSpeed"] = {"who", "speed"}, ["waitFor"] = {"waitFor"}, ["skipTo"] = {"skipTo"}, ["addQTE"] = {"qteData", "origin", "blockProcess"}, ["setCounter"] = {"counterName", "number", "relative"}, ["useItemEffect"] = {}, - ["stopMov"] = {}, + ["stopMov"] = {"who"}, --[name] = {args}, }, argumentWrapper = "arguments", diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/init.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/init.lua index f600ec5..f04dda0 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/init.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/init.lua @@ -155,6 +155,16 @@ function ChoregraphySystem:haveFrameSignal(signal) return self.actor:haveFrameSignal(signal) end +function ChoregraphySystem:getActor(name) + if (name == "actor") then + return self.actor + elseif (name == "target") then + return self.target.actor + else + return self.fighter.world:getActorByName(name) + end +end + function ChoregraphySystem:sendDamage(power, type, element, isSpecial) if (self.target ~= nil) then if (self.fighter.isAlive) then diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo.lua index bc033d8..4ef6d73 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo.lua @@ -6,15 +6,16 @@ function GoToStep:new(controller, args) end function GoToStep:start() - local x, y = self:getStepCoordinate() - self.choregraphy.actor:goTo(x, y, self.arguments.duration) + local actor = self:getActor(self.arguments.who) - self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "goTo") + actor:goTo(x, y, self.arguments.duration) + + actor:addTaggedAction(self.tag, self.choregraphy, "goTo") if (self.arguments.blockProcess == false) then self:finish() else - self.choregraphy.actor:blockChoregraphy(self.arguments.blockProcess, self, "goTo") + actor:blockChoregraphy(self.arguments.blockProcess, self, "goTo") end end diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo3D.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo3D.lua index 4846695..51590e4 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo3D.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo3D.lua @@ -6,15 +6,16 @@ function GoTo3DStep:new(controller, args) end function GoTo3DStep:start() - local x, y, z = self:getStepCoordinate() - self.choregraphy.actor:goTo3D(x, y, z, self.arguments.duration) + local actor = self:getActor(self.arguments.who) + + actor:goTo3D(x, y, z, self.arguments.duration) + actor:addTaggedAction(self.tag, self.choregraphy, "goTo") - self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "goTo") if (self.arguments.blockProcess == false) then self:finish() else - self.choregraphy.actor:blockChoregraphy(self.arguments.blockProcess, self, "goTo") + actor:blockChoregraphy(self.arguments.blockProcess, self, "goTo") end end diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jump.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jump.lua index 8b9621c..712d737 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jump.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jump.lua @@ -6,13 +6,15 @@ function JumpStep:new(controller, args) end function JumpStep:start() - self.choregraphy.actor:setJump(self.arguments.power, 0, self.arguments.useDefaultAnimation) + local actor = self:getActor(self.arguments.who) - self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "jump") + actor:setJump(self.arguments.power, 0, self.arguments.useDefaultAnimation) + + actor:addTaggedAction(self.tag, self.choregraphy, "jump") if (self.arguments.blockProcess == false) then self:finish() else - self.choregraphy.actor:blockChoregraphy(self.arguments.blockProcess, self, "jump") + actor:blockChoregraphy(self.arguments.blockProcess, self, "jump") end end diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jumpBack.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jumpBack.lua index 78e8060..47c4bc8 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jumpBack.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jumpBack.lua @@ -6,14 +6,15 @@ function JumpBackStep:new(controller, args) end function JumpBackStep:start() + local actor = self:getActor(self.arguments.who) - self.choregraphy.actor:jumpBack(self.arguments.height, self.arguments.speed) + actor:jumpBack(self.arguments.height, self.arguments.speed) - self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "jump") + actor:addTaggedAction(self.tag, self.choregraphy, "jump") if (self.arguments.blockProcess == false) then self:finish() else - self.choregraphy.actor:blockChoregraphy(self.arguments.blockProcess, self, "jump") + actor:blockChoregraphy(self.arguments.blockProcess, self, "jump") end end diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/parent.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/parent.lua index 60f5537..3479b42 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/parent.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/parent.lua @@ -24,20 +24,27 @@ function StepParent:updateStep(dt) end end +function StepParent:getActor(name) + return self.choregraphy:getActor(name) +end + function StepParent:getStepCoordinate() local argx, argy, argz = self.arguments.x, self.arguments.y, self.arguments.z or 0 + local x, y, z argx = argx * self.choregraphy.actor.start.direction - if (self.arguments.origin == "target") then - local target = self.choregraphy.action.target - local x, y, z = target.actor:getCoordinate() - return x + argx, y + argy, z + argz - elseif (self.arguments.origin == "start") then - local x, y, z = self.choregraphy.actor.start.x, self.choregraphy.actor.start.y, self.choregraphy.actor.start.z - return x + argx, y + argy, z + argz - elseif (self.arguments.origin == "actor") then - local x, y, z = self.choregraphy.actor:getCoordinate() - return x + argx, y + argy, z + argz + local source = self.arguments.origin + + if (source == "start") then + x, y, z = self.choregraphy.actor.start.x, self.choregraphy.actor.start.y, self.choregraphy.actor.start.z + else + local actor = self:getActor(source) + if (actor == nil) then + error("source " .. source .. " not found") + end + x, y, z = actor.x, actor.y, actor.z end + + return x + argx, y + argy, z + argz end function StepParent:finish() diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimSpeed.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimSpeed.lua index 6946071..2ee6cce 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimSpeed.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimSpeed.lua @@ -6,7 +6,9 @@ function SetAnimSpeedStep:new(controller, args) end function SetAnimSpeedStep:start() - self.choregraphy.actor:setAnimSpeed(self.arguments.speed) + local actor = self:getActor(self.arguments.who) + + actor:setAnimSpeed(self.arguments.speed) self:finish() end diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimation.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimation.lua index bc4fd47..cbae4ff 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimation.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimation.lua @@ -6,13 +6,15 @@ function AnimationSetterStep:new(controller, args) end function AnimationSetterStep:start() - self.choregraphy.actor:changeAnimation(self.arguments.animation) + local actor = self:getActor(self.arguments.who) - self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "animation") + actor:changeAnimation(self.arguments.animation) + + actor:addTaggedAction(self.tag, self.choregraphy, "animation") if (self.arguments.blockProcess == false) then self:finish() else - self.choregraphy.actor:blockChoregraphy(self.arguments.blockProcess, self, "animation") + actor:blockChoregraphy(self.arguments.blockProcess, self, "animation") end end diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/stopMov.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/stopMov.lua index 492ef03..ca36a43 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/stopMov.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/stopMov.lua @@ -6,7 +6,9 @@ function StopMovStep:new(controller, args) end function StopMovStep:start() - self.choregraphy.actor:stopMoving() + local actor = self:getActor(self.arguments.who) + + actor:stopMoving() self:finish() end