TheBlob2 Posted March 2, 2016 Share Posted March 2, 2016 (edited) how to a make a script that triggers its effects on every NPC near the player automatically? Edited March 2, 2016 by TheBlob2 Link to comment Share on other sites More sharing options...
hollaajith Posted March 3, 2016 Share Posted March 3, 2016 What is this effect you are looking for? If its a spell, then just use Explodespell with appropriate spell with area effect. Or if you are looking for different effect you may want to be specific. Probably going to require MWSE. Link to comment Share on other sites More sharing options...
RubberMan01 Posted March 3, 2016 Share Posted March 3, 2016 If (GetDistance "player" < xxx) Do ya thing here Endif The script would have to be attached to every NPC you wanted to affect. Not a good move to be honest. Link to comment Share on other sites More sharing options...
TheBlob2 Posted March 3, 2016 Author Share Posted March 3, 2016 (edited) TI'm trying to make a script that applies a stat boost to all NPCs that are wear items that fit a specific criteria, and changes if the NPC's inventory changes. And i don't want to have to manually put the script on every individual NPC because that would be impractical, I need a better way of doing this. Edited March 3, 2016 by TheBlob2 Link to comment Share on other sites More sharing options...
RubberMan01 Posted March 3, 2016 Share Posted March 3, 2016 Ah but that's not what you asked! If an NPC equips an item that item automatically adds the stat boost. You don't need a script for that you just need to add the boost to the item. Link to comment Share on other sites More sharing options...
TheBlob2 Posted March 3, 2016 Author Share Posted March 3, 2016 (edited) Ah but that's not what you asked! If an NPC equips an item that item automatically adds the stat boost. You don't need a script for that you just need to add the boost to the item. do you mean enchantments? because I don't want to put an enchantment on every single piece of armor in the game because then the player can't enchant them Edited March 3, 2016 by TheBlob2 Link to comment Share on other sites More sharing options...
RubberMan01 Posted March 3, 2016 Share Posted March 3, 2016 Why don't you tell us what you actually want to do? Link to comment Share on other sites More sharing options...
TheBlob2 Posted March 3, 2016 Author Share Posted March 3, 2016 (edited) Why don't you tell us what you actually want to do? -wearing gauntlets (not bracers) makes hand-to-hand attacks deal health damage, the amount of health damage depends on the weightclass of the gauntlets (heavy, medium, light), and their skill in that wieghtclass, the fatigue damage is dealt normally regardless. -wearing helmets hinders the sneak skill of NPCs, which will reduce their chances of detecting sneaking players. -having a crossbow equipped will apply a fortify attack effect that will increase their chance to hit, but only if the crossbow is equipped (historically, crossbows were considered much easier to use compared to long bows) I have successfully made these work on the player, but I don't know how to make them work on all NPCs near the player. Edited March 3, 2016 by TheBlob2 Link to comment Share on other sites More sharing options...
RubberMan01 Posted March 3, 2016 Share Posted March 3, 2016 To make them work on NPC's (that have them) They must; A. Be the best item of it's class that the NPC can useB. They will wear them continuously even they have them in their inventory depending on A It's just a numbers game mate. An NPC will wear what is best for them and that's it. Being "near" the player makes no difference to what they equip (without a script) Link to comment Share on other sites More sharing options...
hollaajith Posted March 4, 2016 Share Posted March 4, 2016 (edited) - There is a mod by Fliggerty that does exactly what you ask. Improved Hand to Hand - Sneak skill on NPCs is rather pointless don't you think. Who are they sneak onto? - This is possible, but requires MWSE scripting to detect when NPC is equipscrossbow and apply the fortification. Morrowind scripting doesn't have a function to affect NPCs without specific ID. You need MWSE. PS: I guess you are new to modding morrowind. Check out couple of guides, to understand how things work. Indigo's Morrowind Guide and Scripting for dummies v9. Those help to understand the limits of the CS, what can and can't be done. Also, if you have time check these numerous tutorials -- CLICK Edited March 4, 2016 by hollaajith Link to comment Share on other sites More sharing options...
Recommended Posts