Jump to content

What is the proper syntax of "SetWeaponProjectile"


TheStein

Recommended Posts

I don't understand the parameters of the function SetWeaponProjectile. In my scripts, I always get the error

 

Invalid magic item 'LongbowFire' for parameter inv item.

etc.

 

 

Say I want to change the projectile for my gun: Longbow to: LongbowFire. What's the correct syntax of doing so?

Link to comment
Share on other sites

It sounds to me like LongbowFire has not been defined as a projectile.

 

The proper syntax (from the FOSE documentation) is:

ref.SetWeaponProjectile NewProjectileInRef:ref target item:ref 

Example: To make the 10mm pistol fire mininukes:

 

Weap10mmPistol.SetWeaponProjectile Fatman ammoFatman

 

 

...Or by reference...

 

 

Ref MyWeeaponRef

Ref MyProjectileRef

Ref MyAmmoRef

 

Begin (some)mode

Set MyWeaponRef to Weap10mmPistiol

Set MyProjectileRef to Fatman

Set MyAmmoRef to ammoFatman

MyWeaponRef.SetWeaponProjectile MyProjectileRef MyAmmoRef

 

 

(note: I've never used this FOSE command myself, so this is my best attempt at getting it to work. The new projectile and optionally, the new ammo inventory object must be defined as a projectile and ammo object respectively in the Geck, of course.)

Link to comment
Share on other sites

  • Recently Browsing   0 members

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