A tag-based OnHit script that causes throwing weapons (or ammo) to return on a successful hit.
Permissions and credits
Credits and distribution permission
Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou are not allowed to upload this file to other sites under any circumstances
Modification permissionYou must get permission from me before you are allowed to modify my files to improve it
Conversion permissionYou are not allowed to convert this file to work on other games under any circumstances
Asset use permissionYou must get permission from me before you are allowed to use any of the assets in this file
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou must get permission to earn Donation Points for your mods if they use my assets
Author notes
This author has not provided any additional notes regarding file permissions
File credits
This author has not credited anyone else in this file
Donation Points system
This mod is not opted-in to receive Donation Points
The tag-based OnHit script below can be used in conjunction with the "Unique Power (On Hit)" item property to cause thrown weapons (axes or darts) to return on a successful hit.
The script also works on ammo, but the returning visual effect doesn't fire. Missed attacks result in the stack decreasing as usual.
Give a stack of throwing weapons or ammo the "On Hit Cast Spell: Unique Power (On Hit)" item property, give the stack a unique tag, then name the script i_itemtag_hc (where 'itemtag' is replaced with the unique tag you gave the stack).
--
// i_itemtag_hc // Tag-based OnHit script for thrown weapons // that return on a successful hit void main() { object oItemHit = GetSpellCastItem(); if (!GetIsObjectValid(oItemHit)) return;