lonewolfkai Posted January 31, 2010 Share Posted January 31, 2010 I'm wanting to make a spell that alter's your form, ie shapeshifting, and I'm wanting it to do so with the use of a spell. Is it possible to make a spell effect that turns off and on by casting and then recasting to turn it off? The only other way I know to do it is just to make it a timed spell. What I'm thinking of is using a similar spell to what the Mythic Dawn uses to change their unarmored stature to the full bound armor set. Link to comment Share on other sites More sharing options...
grmblf Posted January 31, 2010 Share Posted January 31, 2010 Yep, it is possible to make a spell to toggle on and off it's effect, the only thing you'd need is a control variable to check wich action perform each time you cast it. I'd do a quest script to store it, something like:scn myTagMyQuestScript Begin GameMode short giveSpell short controlVar float fQuestDelayTime if giveSpell == 0 player addSpell myTagMySpell set giveSpell to 1; add it only once Endif set fQuestDelayTime to 30 End And then the spell script would have to be something like:scn myTagMySpellScript Begin ScriptEffectStart if myTagMyQuest.controlVar == 0 ; let's turn on ; insert code here set myTagMyQuest.controlVar to 1 else ; let's turn off ; insert code here set myTagMyQuest.controlVar to 0 Endif End Remember that if you addItem, EquipItem, UnequipItem and RemoveItem you must wait a frame between adding and equipping or between unequipping and removing, so you'll need a counter inside the spell script just to wait for that frame. Use ScriptEffectElapsedSeconds to get an accurate timming. Good luck! Link to comment Share on other sites More sharing options...
lonewolfkai Posted February 1, 2010 Author Share Posted February 1, 2010 Yep, it is possible to make a spell to toggle on and off it's effect, the only thing you'd need is a control variable to check wich action perform each time you cast it. I'd do a quest script to store it, something like:scn myTagMyQuestScript Begin GameMode short giveSpell short controlVar float fQuestDelayTime if giveSpell == 0 player addSpell myTagMySpell set giveSpell to 1; add it only once Endif set fQuestDelayTime to 30 End And then the spell script would have to be something like:scn myTagMySpellScript Begin ScriptEffectStart if myTagMyQuest.controlVar == 0 ; let's turn on ; insert code here set myTagMyQuest.controlVar to 1 else ; let's turn off ; insert code here set myTagMyQuest.controlVar to 0 Endif End Remember that if you addItem, EquipItem, UnequipItem and RemoveItem you must wait a frame between adding and equipping or between unequipping and removing, so you'll need a counter inside the spell script just to wait for that frame. Use ScriptEffectElapsedSeconds to get an accurate timming. Good luck! I was hoping there was an option in the CS that I just wasn't seeing. I'm not very good with scripting, and what's listed I have no clue on, but at least it's pointing me to the right direction. I thank you for the reply. First things first though, I have to try to figure out how to "paste over" the armor to a new boundequipment spell. There's a lot of separate meshes. Link to comment Share on other sites More sharing options...
Recommended Posts