Need help with scripting for a follower healing mod

Post » Wed Jun 20, 2012 1:43 am

I want to create a mod that adds new healing spells for compainons. These spells will be designed to be fire and forget and that will hit the player, not something like fireball but where it has to travel to the target/target location. As far as I know there arent any spells like that in game then I realized I would need to script the spells.

I've programmed with C/C++ so Im not afraid to get down and dirty with some code I just need some guidance on what I need to look for.

So far I'm thinking that a new AI package which will check for several conditions, i.e player combat or player health percentages. Which will call my script when the script runs it will check Player health percentage and pass it to a float variable. This float will be checked against the comapion spell list and the companion will cast the appropriate spell.

My Question finally being how do I set the player to be the target of a spell, I'm thinking target actor but I dont see any other way besides scripting to narrow down potential targets.

Any and all help would be appreciated.
User avatar
Anna Watts
 
Posts: 3476
Joined: Sat Jun 17, 2006 8:31 pm

Post » Wed Jun 20, 2012 3:04 pm

Just make the player the target of the package.
User avatar
Jeremy Kenney
 
Posts: 3293
Joined: Sun Aug 05, 2007 5:36 pm

Post » Wed Jun 20, 2012 3:05 pm

I think being in combat will override any AI package you put on the NPC. Unless you intend to keep the NPC out of combat... Is there some setting so that an NPC will follow the player but not help when the player gets attacked?
User avatar
Laura
 
Posts: 3456
Joined: Sun Sep 10, 2006 7:11 am

Post » Wed Jun 20, 2012 6:48 am

I think being in combat will override any AI package you put on the NPC. Unless you intend to keep the NPC out of combat... Is there some setting so that an NPC will follow the player but not help when the player gets attacked?
Good point. I fortgot adding that. You need to make it an override package and include between the combat overrides of the package the NPC uses normally.
User avatar
Rodney C
 
Posts: 3520
Joined: Sat Aug 18, 2007 12:54 am


Return to V - Skyrim