YoungThaddeus Posted July 29, 2020 Share Posted July 29, 2020 Hey, I'm trying to make use of the function PauseEffects from effectManager.ws but I can't get the sourceName parameter to get accepted because wherever I get sourceName from is always a string. When I try to implement the effects.sourceName code it says "cannot convert from string to name". I found a NameToString function, but I can't find a StringToName so that the PauseEffects function will accept my sourceName. Any help would be appreciated. Link to comment Share on other sites More sharing options...
eNoodles Posted July 30, 2020 Share Posted July 30, 2020 (edited) If you know the names of the effects, you could do something like this- function effectStringToName(s : string) : name{switch (s){case "effect1": return 'effect1'; break;case "effect2": return 'effect2'; break;}return '';} Edited July 30, 2020 by eNoodles Link to comment Share on other sites More sharing options...
YoungThaddeus Posted July 31, 2020 Author Share Posted July 31, 2020 If you know the names of the effects, you could do something like this- function effectStringToName(s : string) : name{switch (s){case "effect1": return 'effect1'; break;case "effect2": return 'effect2'; break;}return '';} Thanks I'll give that a try. Do you happen to know if the sourceName parameter means the ability's name, the player character's name, or something else? I found an already made function called EffectTypeToName but that didn't end up working to use as effects.EffectTypeToName() for the sourceName parameter. What I'm currently trying to do is use the PauseEffect function inside of the Friendly Meditation mod to keep buffs' durations from counting down while meditating, if that helps give you any clearer idea of how to help. Link to comment Share on other sites More sharing options...
Recommended Posts