dizietemblesssma Posted October 13, 2020 Share Posted October 13, 2020 I have the following snippet: If undress_toggle == True dz_outfits_ability_spell.cast(teammate_ref,teammate_ref) undress_toggle = False EndIf It's important that while the dz_outfits_ability_spell runs that 'undress_toggle' stay = True. Am I right in thinking that the script from the spell will start running and might not be finished before undress_toggle is set to False? diziet Link to comment Share on other sites More sharing options...
Evangela Posted October 13, 2020 Share Posted October 13, 2020 Cast is a latent function meaning everything after it will have to wait until after the spell it's going to cast has been cast. If that makes sense. Thus in your code, the toggle will become false after the cast is complete. Link to comment Share on other sites More sharing options...
dizietemblesssma Posted October 13, 2020 Author Share Posted October 13, 2020 So it's ok to think of the whole script that is the magic effect as the spell, and that it has to finish before the next line (undress_toggle = False) runs, or at least the OnEffectStart part of the magiceffect script? i guess I'm asking what constitutes the 'cast being complete'? Some spells give effects and stuff that are semi-permanent, but I can't imagine the 'cast'ing of those being incomplete? diziet Link to comment Share on other sites More sharing options...
Evangela Posted October 14, 2020 Share Posted October 14, 2020 The effects don't matter. It's the spell form itself being cast that does. Like as soon as you see Firebolt go off, cast would be out of queue. Link to comment Share on other sites More sharing options...
Recommended Posts