Jump to content

Recommended Posts

Posted

im trying to set every weapon thats equipped by the player to use the mini nuke.

 

Import InstanceData

Formlist Property FatmanProjectile Auto

Event OnItemEquipped(Form akBaseObject, ObjectReference akReference)
	if akBaseObject as Weapon
		InstanceData:Owner thisInstance = Game.GetPlayer().GetInstanceOwner(35)
		InstanceData:Owner thatInstance = Game.GetPlayer().GetInstanceOwner(34)
		SetProjectileOverride(thatInstance, FatmanProjectile)
		SetProjectileOverride(thisInstance, FatmanProjectile)
	EndIf
EndEvent

this is what i have right now and it compiles fine and as far as i know should work, but the 10mm pistol still just shoots its normal projectile. (i only did 34 and 35 to see if i was using the wrong hand)

do i need to do something else to weapons before calling the SetProjectileOverride?

Posted

Is the 10mm pistol using object modification which also call for SetProjectileOverride ?

Posted

Try slot 41, that's the equipped weapon's slot.

Function SetEquippedWeaponAmmo(Actor akActor, Ammo newAmmo)
	Weapon akWeapon = akActor.GetEquippedWeapon()
	If akWeapon
		InstanceData:Owner akOwner = akActor.GetInstanceOwner(41)  ; 41 is the weapon equip slot
		InstanceData.SetAmmo(akOwner, newAmmo)		; maybe it's SetProjectileOverride
	EndIf
EndFunction

 

  • 2 weeks later...
Posted

yes thank you larann! 

SetProjectileOverride worked with slot 41 ๐Ÿ™‚


sorry for the late reply, even tho i have alerts on for this thread it never sent me an email notification like the old forums did so i assumed just no one replied!
 

  • Recently Browsing   0 members

    • No registered users viewing this page.
ร—
ร—
  • Create New...