OnPackageDone

Post » Sat Feb 19, 2011 9:24 am

Here's what Im trying to do, if somebody could tell me the best way to do this, that'd be great.

I need to create a package, that when added to an NPC, causes the NPC to cast spells from his/her spell list, for 30 seconds.

After the the 30 seconds are up, a few items are added to the Npcs Inventory. I need this to happen reliably everytime the package ends.

Can anyone tell me how to configure the package to make sure this happens? My attempts so far have only gotten the Npc to cast a spell once and the onpackagedone function in the script thats attached to them never executes.
User avatar
des lynam
 
Posts: 3444
Joined: Thu Jul 19, 2007 4:07 pm

Post » Sat Feb 19, 2011 3:04 am

Just so you know, you will not be able to script an NPC to cast may types of spells such as target spells and touch spells. They will either get "ai stuck" or fire spells along the y axes instead of the target direction. With touch spells they normally just ignore the scripted command if their target is out of arms reach. You can put a marker in a location and have them do "target practice" in the same direction that the marker is angled. You need to look at an existing AI package for one of the NPC that practice casting magic at targets in any of the the Mage's guild. I have not done this in over a year so I do not remember the exact steps to build the AI package for magic target practice or I would list a few of them for you here.
User avatar
GEo LIme
 
Posts: 3304
Joined: Wed Oct 03, 2007 7:18 pm


Return to IV - Oblivion