Jump to content

Help with applying magic effect via dialogue


taro8

Recommended Posts

Hi. Im editing a mod and I want to add an NPC that will sell me a carriage. I only need to do the NPC and the quest that will let the game tell if I already bought the cart.

 

However I have a problem: I need to apply a magic effect on a player that is a used by a spell from the original mod. How can I script that in papyrus fragment in dialogue editor?

 

The id of the magic effect is xgfPferdeKarrenRuf

 

Please help me this is the only thing that is holding me back.

Link to comment
Share on other sites

In the script fragment put "NameOfSpell.Cast(Game.GetPlayer())" (without the quotes and replace with the name of the spell you want to cast which applies the magic effect) and hit compile. You will get an error, just ignore it and back out of the dialogue window by pressing OK and then go back into the dialogue window (you have to do this otherwise it won't let you add properties). You will see the fragment compiled into a script in the list of scripts called something beginning with TIF_ followed by a random number. Right click it and go to Edit Properties and then click Add Property and set the the type to SPELL and name it after the spell. Once you have created the property make sure to set it to your spell by hitting Edit Value and choosing it in the drop down box. Now exit the properties window, right click the script again choose Edit Source then in the script editor window hit File and choose Save and it should compile and say Save Succeeded at the bottom of the window if everything went ok. I also like to hit the compile button below the script fragment afterwards just to be sure it works. You have now added a script which casts a spell on the player when you trigger that dialogue.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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