Help with "IsEquipped" script please.

Post » Sat Apr 11, 2015 10:05 pm

Actor Property PlayerRef Auto ObjectReference Property MyMarker AutoExplosion Property MyExp AutoKeyword Property Firespells Auto	Event OnTrigger(objectreference akactionref)		If(akactionref == PlayerRef)If (Game.GetPlayer().IsEquipped(Firespells))MyMarker.PlaceAtMe(MyExp)		EndIf		EndIf	EndEvent

I am trying to make it that when player enters a trigger and has any fire spell equipped an explosion occurs.

It's not happening right now, no explosion. I have the keyword property set to MagicDamageFire, am testing it with level 1 player so only flames spell available and this is my current script.

User avatar
Nathan Risch
 
Posts: 3313
Joined: Sun Aug 05, 2007 10:15 pm

Post » Sat Apr 11, 2015 9:37 pm

A player wont have a keyword equipped.

Check the IsEquipped's return value for the keyword?

EDIT: You might need http://www.creationkit.com/GetEquippedItemType_-_Actor and http://www.creationkit.com/GetEquippedSpell_-_Actor instead.

User avatar
lucile
 
Posts: 3371
Joined: Thu Mar 22, 2007 4:37 pm

Post » Sun Apr 12, 2015 8:03 am

Yep, what Antares said.

This might work:

Actor Property PlayerRef Auto ObjectReference Property MyMarker AutoExplosion Property MyExp AutoKeyword Property Firespells AutoEvent OnTrigger(objectreference akactionref)    If(akactionref == PlayerRef)        If (PlayerRef.GetEquippedSpell(0).HasKeyword(Firespells) \            || PlayerRef.GetEquippedSpell(1).HasKeyword(Firespells))                MyMarker.PlaceAtMe(MyExp)        EndIf    EndIfEndEvent
User avatar
alicia hillier
 
Posts: 3387
Joined: Tue Feb 06, 2007 2:57 am


Return to V - Skyrim