Jump to content

Scripting help


andyman123

Recommended Posts

Hello all. This is my first real attempt at a mod, and I hit a wall. Basically my project is a spell that summons a unique weapon. I created a sword called the witchblade, which has a script attached much like the dark scales in the DB quest. Alone, the sword & accompanying script work great, but it's when I try and link it to a spell I run into problems. I used one of the extra bound weapon magic effects, set it up so that the spell would summon the witchblade, and it works, somewhat. I can summon the sword, but the script won't work. I've tried modifying it so that it uses onequip player, onadd player, and even gamemode to see if any make it a difference, but it doesn't. Any advice would be greatly appreciated! Thanks
Link to comment
Share on other sites

Don't try using one of the pre-existing spell effects. Instead just create a new spell and give it a script effect (make sure it is set to be a magic effect script).

 

Scriptname andysummonweaponspellscript

begin scripteffectstart

player.additem MagicalSwordID 1
player.equipitem MagicalSwordID

end

begin scripteffectfinish

player.removeitem MagicalSwordID 1

end

 

The script might not equip the item to the player, in which case they will just have to equip it themselves. You may want to make the sword a quest object so it can't be dropped.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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