Jump to content

Ammo Switching Help - Scripts


Recommended Posts

Hello

 

Can you help me? I have the coding logic, but I don't know how to make this work:

Scriptname T6MAmmoSwitch extends ActiveMagicEffect Const

Form Property ActivatorItem Auto Const
ObjectMod Property T6MMod Auto Const
Weapon Property MyWeapon Auto Const
Message Property T6MAmmoSwitchDeny Auto Const
Message Property T6MAmmoSwitchAllow Auto Const
Keyword Property T6MKeyword Auto Const

Event OnEffectStart(Actor akTarget, Actor akCaster)
    MyWeapon = akCaster.GetEquippedWeapon()
    If(MyWeapon.HasKeyword(T6MKeyword))
	akActor.AttachModToInventoryItem(MyWeapon, T6MMod)
        T6MAmmoSwitchAllow.show()
    Else	
        T6MAmmoSwitchDeny.show()
    EndIf
    akActor.AddItem(ActivatorItem, 1, True)
EndEvent

Please help.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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