Face_Akiir Posted June 10, 2022 Share Posted June 10, 2022 Hello, I am working on a mod for wigfrid and was trying to add the ability for her to stop singing with a right click on her songs. I can't seem to figure out how to go about this though. Any help would be very much appreciated! Thanks! Link to comment Share on other sites More sharing options...
Face_Akiir Posted June 11, 2022 Author Share Posted June 11, 2022 (edited) Cancel_action=AddAction("Cancel",function(act) if act.doer:HasTag("player") and act.target.components.singinginspiration and target.components.singinginspiration:IsSinging() then act.target.components.singable:Cancel return true else return false end end) Cancel_action.priority = 10 AddComponentAction("SCENE","singable", function(inst, doer, actions, right) if inst.prefab and inst.components.singinginspiration and inst.components.singinginspiration:IsSinging() and doer.prefab == "wathgrithr" then table.insert(actions, GLOBAL.ACTIONS.Cancel) end end) AddStategraphActionHandler("wilson", GLOBAL.ActionHandler(GLOBAL.ACTIONS.Cancel)) AddStategraphActionHandler("wilson_client", GLOBAL.ActionHandler(GLOBAL.ACTIONS.Cancel)) This is what I have so far and Its not working. Edited June 11, 2022 by Face_Akiir Link to comment 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