virginharvester Posted June 21, 2018 Share Posted June 21, 2018 sorry for my bad english,i like to recreate Equilibrium spell, and have this some syntax problem, can somebody fix it please? ;while magicka under 100% and health above 50%while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) AND (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1) ;damage health by 10 point per second and heal magicka by 10 point per secondGame.GetPlayer().DamageAV("Health", 10)Game.GetPlayer().RestoreAV("Health", 10)delay 1 second ;<= i dont know this scriptendWhile Link to comment Share on other sites More sharing options...
Grospolina Posted June 22, 2018 Share Posted June 22, 2018 (edited) Change your "AND" to &&. I don't think "AND" will work. To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours). ;while magicka under 100% and health above 50% while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1) ;damage health by 10 point per second and heal magicka by 10 point per second Game.GetPlayer().DamageAV("Health", 10) Game.GetPlayer().RestoreAV("Health", 10) Utility.Wait(1.0) endWhile Edited June 22, 2018 by Grospolina Link to comment Share on other sites More sharing options...
virginharvester Posted June 23, 2018 Author Share Posted June 23, 2018 Change your "AND" to &&. I don't think "AND" will work. To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours). ;while magicka under 100% and health above 50% while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1) ;damage health by 10 point per second and heal magicka by 10 point per second Game.GetPlayer().DamageAV("Health", 10) Game.GetPlayer().RestoreAV("Health", 10) Utility.Wait(1.0) endWhile thanks for answer, but i like to ask, is the Utility.WaitMenuMode(float afSeconds) and Utility.WaitGameTime(float afHours) is making the game pause like when open menu?(the game is paused), i like to make spell reduce health every 1 second(just like original Equilibrium spell), not make "freeze" the game when converting health to magicka, anyway thanks for reply and "AND" syntax Link to comment Share on other sites More sharing options...
foamyesque Posted June 23, 2018 Share Posted June 23, 2018 You should be able to accomplish all of the desired effects listed here without needing any scripting at all, just use of conditions on the magic effects of the spell. Link to comment Share on other sites More sharing options...
Evangela Posted June 23, 2018 Share Posted June 23, 2018 (edited) Indeed, I second the magic effect suggestion. Change your "AND" to &&. I don't think "AND" will work. To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours). ;while magicka under 100% and health above 50% while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1) ;damage health by 10 point per second and heal magicka by 10 point per second Game.GetPlayer().DamageAV("Health", 10) Game.GetPlayer().RestoreAV("Health", 10) Utility.Wait(1.0) endWhile thanks for answer, but i like to ask, is the Utility.WaitMenuMode(float afSeconds) and Utility.WaitGameTime(float afHours) is making the game pause like when open menu?(the game is paused), i like to make spell reduce health every 1 second(just like original Equilibrium spell), not make "freeze" the game when converting health to magicka, anyway thanks for reply and "AND" syntax WaitMenuMode is for time spent in the a menu, which is otherwise not counted. It appears not all menus pause game time though.WaitGameTime is for time spent in the game(not real time) and is not counted in menus.Wait is real time spent and is not counted in menus. Edited June 23, 2018 by Rasikko Link to comment Share on other sites More sharing options...
foamyesque Posted June 23, 2018 Share Posted June 23, 2018 Note: None of the above Wait effects will pause the game, just that particular script's execution. Link to comment Share on other sites More sharing options...
virginharvester Posted June 24, 2018 Author Share Posted June 24, 2018 sorry for my bad english,i like to recreate Equilibrium spell, and have this some syntax problem, can somebody fix it please? ;while magicka under 100% and health above 50%while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) AND (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1) ;damage health by 10 point per second and heal magicka by 10 point per secondGame.GetPlayer().DamageAV("Health", 10)Game.GetPlayer().RestoreAV("Health", 10)delay 1 second ;<= i dont know this scriptendWhile Change your "AND" to &&. I don't think "AND" will work. To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours). ;while magicka under 100% and health above 50% while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1) ;damage health by 10 point per second and heal magicka by 10 point per second Game.GetPlayer().DamageAV("Health", 10) Game.GetPlayer().RestoreAV("Health", 10) Utility.Wait(1.0) endWhile Change your "AND" to &&. I don't think "AND" will work. To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours). ;while magicka under 100% and health above 50% while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1) ;damage health by 10 point per second and heal magicka by 10 point per second Game.GetPlayer().DamageAV("Health", 10) Game.GetPlayer().RestoreAV("Health", 10) Utility.Wait(1.0) endWhile thanks for answer, but i like to ask, is the Utility.WaitMenuMode(float afSeconds) and Utility.WaitGameTime(float afHours) is making the game pause like when open menu?(the game is paused), i like to make spell reduce health every 1 second(just like original Equilibrium spell), not make "freeze" the game when converting health to magicka, anyway thanks for reply and "AND" syntax You should be able to accomplish all of the desired effects listed here without needing any scripting at all, just use of conditions on the magic effects of the spell. Indeed, I second the magic effect suggestion. Change your "AND" to &&. I don't think "AND" will work. To delay 1 second, use Utility.Wait(float afSeconds). Note that this will pause if the menu is open. If you don't want that, then use Utility.WaitMenuMode(float afSeconds) instead. Both of those are in realtime seconds. For waiting game time, you can use Utility.WaitGameTime(float afHours). ;while magicka under 100% and health above 50% while (Game.GetPlayer().GetActorValue(Health) / Game.GetPlayer().GetBaseActorValue(Health) > 0.5) && (Game.GetPlayer().GetActorValue(Magicka) / Game.GetPlayer().GetBaseActorValue(Magicka) < 1) ;damage health by 10 point per second and heal magicka by 10 point per second Game.GetPlayer().DamageAV("Health", 10) Game.GetPlayer().RestoreAV("Health", 10) Utility.Wait(1.0) endWhile thanks for answer, but i like to ask, is the Utility.WaitMenuMode(float afSeconds) and Utility.WaitGameTime(float afHours) is making the game pause like when open menu?(the game is paused), i like to make spell reduce health every 1 second(just like original Equilibrium spell), not make "freeze" the game when converting health to magicka, anyway thanks for reply and "AND" syntax WaitMenuMode is for time spent in the a menu, which is otherwise not counted. It appears not all menus pause game time though.WaitGameTime is for time spent in the game(not real time) and is not counted in menus.Wait is real time spent and is not counted in menus. Note: None of the above Wait effects will pause the game, just that particular script's execution. yes it work, thanks anyone, i add new kudos to everybody, Link to comment Share on other sites More sharing options...
Recommended Posts