AndrealphusVIII Posted May 15, 2016 Share Posted May 15, 2016 I'm working on a slingshot mod and I want to make special ammo for them. Basically I'm trying to accomplish the following: The player and all NPCs can't use this special ammo with regular bows/crossbows.The player and all NPCs can't use regular ammo with the slingshotsThe special ammo (for the slingshot) doesn't stick to the player and NPCs.Any advice on how to tackle this? Kind regards Andre Link to comment Share on other sites More sharing options...
MathLeBeau Posted May 15, 2016 Share Posted May 15, 2016 Maybe you can add an condition to this? I dont have my ck open right now. But I thing its almost similar to the conditions the the forge. Link to comment Share on other sites More sharing options...
AndrealphusVIII Posted May 15, 2016 Author Share Posted May 15, 2016 The crafting isn't really an issue. I want to prevent the regular arrows, to be equipped with the slingshots and special ammo (balls) to be prevented to be equipped when you use normal bows. So, besides arrows and bolts, I basically want a 3rd ammo type. (as bolts can't be use on bows and arrows can't be used on crossbows) Link to comment Share on other sites More sharing options...
FrankFamily Posted May 16, 2016 Share Posted May 16, 2016 (edited) My idea: quest > player alias > script > onobjectequipped and getequippedweapon:http://www.creationkit.com/index.php?title=OnObjectEquipped_-_Actorhttp://www.creationkit.com/index.php?title=GetEquippedWeapon_-_Actor Then add keywords or make a formlist with slingshot ammo and weapons separately and comapare Onobjectequipped form akbaseobject etc etc If (akbaseobject.haskeyword(slingshotammo) != getequippedweapon.haskeyword(slingshot) ; missmatchUnequipitem akbaseobject etcEndifEndevent Edited May 16, 2016 by FrankFamily Link to comment Share on other sites More sharing options...
AndrealphusVIII Posted May 16, 2016 Author Share Posted May 16, 2016 My idea: quest > player alias > script > onobjectequipped and getequippedweapon:http://www.creationkit.com/index.php?title=OnObjectEquipped_-_Actorhttp://www.creationkit.com/index.php?title=GetEquippedWeapon_-_Actor Then add keywords or make a formlist with slingshot ammo and weapons separately and comapare Onobjectequipped form akbaseobject etc etcIf (akbaseobject.haskeyword(slingshotammo) != getequippedweapon.haskeyword(slingshot) ; missmatchUnequipitem akbaseobject etcEndifEndeventBut will that also work for all NPCs, or just the player? I want to add the Slingshots to the leveled lists so NPCs use them as well. Link to comment Share on other sites More sharing options...
FrankFamily Posted May 16, 2016 Share Posted May 16, 2016 (edited) That would just work for the player, a method that works for both npcs and player would be to put the same script of the alias above in a passive ability added by the slingshot by while equipped A) onequip/onunequip > add spell/remove spell > passive ability while slingshot equipped > magic effect passive > script. B) Weapon enchantment (offensive) > magic effect offensive > equip ability drop menu (bottom) > passive ability while slingshot equipped > magic effect passive > script. But this would occupy the enchantment slot, it is more reliable than the above though. In any case the above script is missing a check now that i look at it again: Onobjectequipped form akbaseobject etc etc if akbaseobject as Ammo ; First check if it is ammo by casting or maybe a keyword if all ammo shares it If (akbaseobject.haskeyword(slingshotammo) != getequippedweapon.haskeyword(slingshot) ; missmatch, slingshot ammo with bow or arrows with slingshot Unequipitem akbaseobject etc ;unequip the ammo Endif Endif Endevent EDIT: No wait, if the slingshot adds this then it won't trigger when you try to use slingshot ammo on a bow. So maybe split the two parts of the functionality: Script on the slingshot ammo that checks if you have a slingshot equipped and unequips itself if not, can ammo be scripted? not sure atmPlus the script above though a passive ability that simply checks if you equip ammo that is not slingshot while the slingshot is equipped. Edited May 16, 2016 by FrankFamily Link to comment Share on other sites More sharing options...
AndrealphusVIII Posted May 16, 2016 Author Share Posted May 16, 2016 As for as I know, I don't think ammo can have scripts attached. Link to comment Share on other sites More sharing options...
Recommended Posts