monkeyboi Posted November 4, 2010 Author Share Posted November 4, 2010 do you happen to know a way to add a magicka drain within a script?, or magic effects without those icons? Link to comment Share on other sites More sharing options...
documn Posted November 4, 2010 Share Posted November 4, 2010 If dispel isn't working, you can try removespell instead. To add a magicka drain, you can use addspell. Link to comment Share on other sites More sharing options...
monkeyboi Posted November 4, 2010 Author Share Posted November 4, 2010 ok new question: within my script i am using a timer (for a built in magicka drain)but i need a command that tells it to check the timer constantly Link to comment Share on other sites More sharing options...
Deleted1848331User Posted November 5, 2010 Share Posted November 5, 2010 float timer set timer to ## if timer <= Highest Number commandcommandcommand if timer <= just keep going down to 1 commandcommandcommand ;use this part for your script. should work fine. Link to comment Share on other sites More sharing options...
documn Posted November 5, 2010 Share Posted November 5, 2010 Good tutorial for timers: http://cs.elderscrolls.com/constwiki/index.php/Scripting_Tutorial:_Creating_a_Simple_Timer Link to comment Share on other sites More sharing options...
monkeyboi Posted November 5, 2010 Author Share Posted November 5, 2010 LordFrostcraig that would work, but i want it to check it indefinatly my goal was to have the script drain 1 pt of magicka per second, and once magicka hits 0 then it turns offany ideas for that? Link to comment Share on other sites More sharing options...
Deleted1848331User Posted November 5, 2010 Share Posted November 5, 2010 hmmm... I haven't used timers before, so I have to think lol. float timer set timer to 1000000 if timer >= 999999 Player.ModAv Magicka -1 ... if Player.GetAV Magicka == 0) set timer to 0 ;and so on. this would be a VERY long code though... As I've said, I haven't used timers. You'll need someone who has lol. Link to comment Share on other sites More sharing options...
documn Posted November 5, 2010 Share Posted November 5, 2010 This is an example code that will drain 1 pt of magicka every second, and will stop when the actor's magicka hits 0: 1. Make an item i.e. a ring, clutter, or something else that you can hold in your inventory. Make a spell that will add this item to the actor's inventory when they get hit by the spell. A script effect that has AddItem in a ScriptEffectStart block should work nicely. 2. Add the following script to your item: scn DrainMagickaScript float timer ref actor begin onadd set actor to getcontainer end begin gamemode if actor.getav magicka <= 0 removeme else if timer > 0 set timer to timer - getsecondspassed else set timer to 1 player.modav magicka -1 endif endif end Link to comment Share on other sites More sharing options...
monkeyboi Posted November 5, 2010 Author Share Posted November 5, 2010 okay, i have a solution for my problems...i need to start using OBSE...thats not an issue but i cant figure out how to launch the CS in "obse mode" any help... im running windows 7 btw Link to comment Share on other sites More sharing options...
documn Posted November 5, 2010 Share Posted November 5, 2010 Make a shortcut. Put the target as \Oblivion\obse_loader.exe -editorMore detailed instructions in the OBSE readme or here: http://cs.elderscrol.../index.php/Obse By the way, I haven't seen anything in your scripts so far that would need OBSE, but if you really wanna use it, I don't see why not. Link to comment Share on other sites More sharing options...
Recommended Posts