Jump to content

Scripting Problem


Beerto

Recommended Posts

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
End

I 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

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

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

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...