Beerto Posted April 20, 2011 Share Posted April 20, 2011 I'm currently trying to make a water bottling mod (A mod that lets you bottle water from watersources), to train my scripting - as I am very new to it. So, after going through the script commands I found "begin onMagicEffectHit", though it doesnt seem to work ( I can't save the script as long as that line is in it)Anyways, heres my script, please tell me why I'm having theese problems. Again, I am a newbie to scripting, so any sort of help would be greatly appreciated.scriptname BGESSFillPurified Begin onMagicEffectHit WaterHeal1Purified if Player.GetItemCount BGESSEmptyBottle >= 1 Player.AddItem BGESSBottlePurified 1 Player.RemoveItem BGESSEmptyBottle 1 ShowMessage BGESSBottleFill endif EndI found the onMagicEffectHit on the G.E.C.K commands website, so it should work (however it does not). The main Idea was that the script would run once the character is "hit" by the healing spell that the character would get from activating any kind of water source. Link to comment Share on other sites More sharing options...
enlo Posted April 20, 2011 Share Posted April 20, 2011 when you cannot save it, you did something wrong and the script couldn't compile (obviously hehe)check the spelling of all references / or clear the whole block and add the stuff while repeatetly saving to root out the cause Link to comment Share on other sites More sharing options...
Skevitj Posted April 20, 2011 Share Posted April 20, 2011 (edited) What "type" is the script? The most likely cause is that the particular begin argument doesn't like the type of script, ie Object, Effect, Quest. What are you placing the script on? Edited April 20, 2011 by Skevitj Link to comment Share on other sites More sharing options...
Beerto Posted April 20, 2011 Author Share Posted April 20, 2011 when you cannot save it, you did something wrong and the script couldn't compile (obviously hehe)check the spelling of all references / or clear the whole block and add the stuff while repeatetly saving to root out the cause It should be spelled correctly, if I change onMagicEffectHit to onActivate it lets me save it. What "type" is the script? The most likely cause is that the particular begin argument doesn't like the type of script, ie Object, Effect, Quest. What are you placing the script on?Atm its object Link to comment Share on other sites More sharing options...
rickerhk Posted April 20, 2011 Share Posted April 20, 2011 I doubt if that block type is supported in fallout You can use IsSpellTarget http://geck.bethsoft.com/index.php/IsSpellTarget to check if the player is under a water healing spell, for example: if (player.IsSpellTarget WaterHeal1Purified == 1) ;Do things endif In the geck, look under Actor effects, and filter by 'water' and you will see the others. You will probably want to run the script as a quest script with a Gamemode block and make the quest delay short so it catches those sips at a sink or a toilet ;) Link to comment Share on other sites More sharing options...
davidlallen Posted April 20, 2011 Share Posted April 20, 2011 Also, standard suggestion #1: use "geck powerup" available at newvegasnexus, to allow geck to give error messages when there is an error. You should not have to repeatedly try saving to stumble across any error. Link to comment Share on other sites More sharing options...
Beerto Posted April 20, 2011 Author Share Posted April 20, 2011 Thank you guys, youve been a great help. The mod works now. Im not releasing it yet though :0 Link to comment Share on other sites More sharing options...
Recommended Posts