iam currently working on my first mod, a nirnroot quest made from scratch, and could use some help with the script for my nirnroot.
to show that i dont want to waste your time:
http://img600.imageshack.us/img600/7645/mgescreenshot005.jpg
http://img213.imageshack.us/img213/8817/mgescreenshot004.jpg
the models are almost done (need some finetuning for the textures) and even the questline is already done.
only the nirnroot script is causing me headache as i dont know anything about scripting.
i want the script to do:
- play a soundloop, deactivate it when plant got removed
- delete the container (the plant) on activation and add ingredient to inventory
- add the quest to the journal
this is what i have:
Spoiler
Begin plant_nirnroot
if ( CellChanged == 0 )
if ( GetSoundPlaying "NirnrootSound" == 0 )
PlayLoopSound3DVP "NirnrootSound", 1.0, 1.0
endif
endif
if ( menumode == 1 )
return
endif
if ( OnActivate == 1 )
PlaySound "Item Ingredient Up"
Disable
Player->additem "NR_item", 1
endif
endif
if ( getjournalindex NR_Quest > 5 )
return
endif
if ( OnActivate == 1 )
journal NR_Quest 5
addtopic "strange plant"
activate
endif
End
if ( CellChanged == 0 )
if ( GetSoundPlaying "NirnrootSound" == 0 )
PlayLoopSound3DVP "NirnrootSound", 1.0, 1.0
endif
endif
if ( menumode == 1 )
return
endif
if ( OnActivate == 1 )
PlaySound "Item Ingredient Up"
Disable
Player->additem "NR_item", 1
endif
endif
if ( getjournalindex NR_Quest > 5 )
return
endif
if ( OnActivate == 1 )
journal NR_Quest 5
addtopic "strange plant"
activate
endif
End
this is not working:
- the soundloop is not stopping (iam thinking of moving the container somewhere, rather than deaktivating it)
- the quest is not added (when i remove "if ( getjournalindex NR_Quest > 5 )" i get the quest entry every time)
i dont know very much about scripting, i can understand what i read but i cant write something myself, so i stole the parts i needed from Syc_Herbalism and some MW scripts.
thanks!