Is it possible to give actors custom perks?

Post » Sat Nov 17, 2012 11:19 pm

I want to script a weapon to give an actor a custom perk if they are a specific race, and are using that specific weapon...is it possible?
User avatar
Portions
 
Posts: 3499
Joined: Thu Jun 14, 2007 1:47 am

Post » Sun Nov 18, 2012 12:38 am

You can't give actors perks ingame, but you can give them the perk and make that the conditions for it to work aren't meet unless the race and having sword are meet. I suppose that won't help in your case (it seems you want to make a new sword affecting any NPC from specific races outside your mod). If so, you should use spells or abilities.
User avatar
Sammygirl
 
Posts: 3378
Joined: Fri Jun 16, 2006 6:15 pm

Post » Sat Nov 17, 2012 4:27 pm

Unless this has been fixed in the last update you cannot give perks (proper) to actors dynamically. All the methods to do so such as the function AddPerk() are broken (only work for the player).

You can FAKE it by making normal spells that look like perks, then give them the spell.


I want to script a weapon to give an actor a custom perk if they are a specific race, and are using a specific weapon...is it possible?
User avatar
sunny lovett
 
Posts: 3388
Joined: Thu Dec 07, 2006 4:59 am

Post » Sat Nov 17, 2012 8:29 pm

Mm okay in that case, is it possible for me to set the weapon to detect the weapon holder's race (DraugrRace for example), then give that holder a custom spell if he matches up as a Draugr?
User avatar
Ice Fire
 
Posts: 3394
Joined: Fri Nov 16, 2007 3:27 am

Post » Sat Nov 17, 2012 11:29 pm

Yes.

Race Property DraugrRace autoSpell Property AbilityInQuestion autoevent OnEquipped(Actor akActor)   if akActor.GetRace()==DraugrRace	  akActor.addSpell(AbilityInQuestion)  endIfendEvent
User avatar
NO suckers In Here
 
Posts: 3449
Joined: Thu Jul 13, 2006 2:05 am

Post » Sat Nov 17, 2012 12:15 pm

Yes.

Race Property DraugrRace autoSpell Property AbilityInQuestion autoevent OnEquipped(Actor akActor)   if akActor.GetRace()==DraugrRace	  akActor.addSpell(AbilityInQuestion)  endIfendEvent

Sweet thanks! Are you still free to work on coding? I could use it now lol.
User avatar
Jennifer May
 
Posts: 3376
Joined: Thu Aug 16, 2007 3:51 pm


Return to V - Skyrim