Tesumoto Posted December 22, 2018 Share Posted December 22, 2018 (edited) Hello. I need your help with the function. I want to prohibit the use "firestaff" and "staff_tornado" if the target has a tag (ownershiptag). if target:HasTag(ownershiptag) and target:HasTag("structure") then end Edited December 22, 2018 by Tezumoto Link to comment Share on other sites More sharing options...
Tesumoto Posted December 23, 2018 Author Share Posted December 23, 2018 I already ended work with the "firestaff". I was also able to prohibit the use "staff_tornado" on buildings. But if you use "staff_tornado" on a living creature near to a building, it destroed. Is it possible to completely remove the impact on buildings for "staff_tornado"? Link to comment Share on other sites More sharing options...
Ultroman Posted December 23, 2018 Share Posted December 23, 2018 See this topic. Link to comment Share on other sites More sharing options...
Tesumoto Posted December 24, 2018 Author Share Posted December 24, 2018 16 hours ago, Ultroman said: See this topic. Oh, thanks, but I'm not good at it all. I decided to use this: function remove_staff_tornado(prefab) local rec = GLOBAL.AllRecipes[prefab] rec.level = GLOBAL.TECH.LOST rec.nounlock = true end remove_staff_tornado("staff_tornado") Link to comment Share on other sites More sharing options...
Ultroman Posted December 26, 2018 Share Posted December 26, 2018 So you just removed the tornado staff from the game? Link to comment Share on other sites More sharing options...
Tesumoto Posted December 26, 2018 Author Share Posted December 26, 2018 8 hours ago, Ultroman said: So you just removed the tornado staff from the game? Yes, I could only that. I can prohibit using as a target what can be destroyed with a hammer (spellcaster.lua) (line: 141-146): local function IsWorkAction(action) return action == ACTIONS.CHOP --or action == ACTIONS.DIG --or action == ACTIONS.HAMMER or action == ACTIONS.MINE end I just add "--" for ACTION.DIG and ACTION.HAMMER. It is working and people can't use tornado staff on structures and plants. But this is only a prohibition of the target, but the impact itself remains. If you use the tornado staff on a living creatures, then the buildings and plants are destroyed nearby. 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