$OnRemoveScript:
From GECK
Contents
Description
Will call a UDF on the actor who removed the attachment, with the attachments baseform and weapon instance being passed as arguments.
Syntax
$OnRemoveScript: UDF:ref
Example
;Inside "WeaponAttachments\WeapNV9mmPistol\Barrel Device\BarrelDevice_Config.ini" $EditorID: MySilencerAttachment $OnRemoveScript: MyUDF
Will call MyUDF anytime MySilencerAttachment is attached.
scn MyUDF ref rWeapBase ref rWeapInstance ;The specific weapon instance the mod was removed from. ref rActor ref rAttachment ;The baseform of the attachment removed Begin Function {rAttachment rWeapInstance} let rActor := thisAlt let rWeapBase := AuxiliaryVariableGetRef "*_BaseForm" 0 rWeapInstance ;Sets rWeapBase to WeapNV9mmPistol. ;Code end