Renamon Posted January 23, 2017 Share Posted January 23, 2017 Hello everyone, Here's the general run down I need some bright minds to help me out, I've run out of ideas. I have a custom animation and build that is constantly checking and being applied due to position via the locomotor; the problem with this is the game is constantly changing the build and animation bank so when the character dies you cannot access the ghost without everything going wonky. I want to know if I can prevent the locomotor or the set local function to stop activating and from checking said position while I'm a ghost thus allowing the build to set. alternatively, if its possible, is there a way to extend atlas's so I could just add the running build to the already created atlas and rid of the build change? the whole idea was to have a *single* run animation be applied while having the game switch back to wilson's animation bank after the run animation was done. That part works to an extent but is providing me with a large amount of issues (mostly with the ghost being unable to appear as a ghost rather then a stationary character). does anyone know of a way to have the game check your state (ie just side running) without conflicting with the ghost build? i'm going to attach my prefab.lua the function i'm having issues with is Quote local function OnLocomote(inst, data) if inst:HasTag("playerghost") then return end elseif inst.AnimState:GetCurrentFacing() == 2 then inst.AnimState:SetBuild("renarun") inst.AnimState:SetBank("renarun") inst.AnimState:OverrideSymbol("run_loop", "renarun", "run_loop") --print ("ended on state 2") elseif inst.AnimState:GetCurrentFacing() == 0 then inst.AnimState:SetBuild("renarun") inst.AnimState:SetBank("renarun") inst.AnimState:OverrideSymbol("run_loop", "renarun", "run_loop") ---use this code after testing, will tell the game to reset back to wilsons animations unless you create custom animations elseif inst.AnimState:GetCurrentFacing () == 3 then inst.AnimState:SetBank ("wilson") inst.AnimState:SetBuild("rena") --print("ended on state 3") elseif inst.AnimState:GetCurrentFacing () == 1 then inst.AnimState:SetBank ("wilson") inst.AnimState:SetBuild("rena") --inst:AddTag("renawalk") --print("ended on state 1") end end can anyone help me optimize this? Thank you so very much for your time in advance, its been a few weeks. rena.lua Link to comment https://forums.kleientertainment.com/forums/topic/73560-animation-appearing-over-ghost/ Share on other sites More sharing options...
Renamon Posted January 24, 2017 Author Share Posted January 24, 2017 issue resolved (kind of) game is now recognizing when the character is entering the ghost state problem was: local function OnLocomote(inst, data) if inst:HasTag("playerghost") then return end if inst.AnimState:GetCurrentFacing() == 2 then inst.AnimState:SetBuild("renarun") inst.AnimState:SetBank("renarun") inst.AnimState:OverrideSymbol("run_loop", "renarun", "run_loop") --print ("ended on state 2") the if was not supposed to be an elseif on line 5. Link to comment https://forums.kleientertainment.com/forums/topic/73560-animation-appearing-over-ghost/#findComment-860850 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now