Jump to content

Wigfrid Stop singing mod help


Recommended Posts

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

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 by Face_Akiir
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...