FwuffyMouse Posted June 19, 2015 Posted June 19, 2015 I have VERY LITTLE scripting knowledge, and i think this ought to be simple, but in my searches i cannot find a way to do what i want to with a script. Here's what I want it to do. Find every npc of a specific race within an area, equip them with an item (a tail, in this case) and somehow avoid causing a great deal of lag. A player character furry is nice, but as an ambitious shithead, I want to replace all of one race with mice. (partially to see if i Can do the aforementioned tails automagically) this is strictly a scripting matter, because unless I can put tails on the converted race, i don't wanna bother with aesthetics unless I'm sure this can work.how simple is it to actually do this, and how much pressure would it put on the scripting?
Odessa Posted June 19, 2015 Posted June 19, 2015 array_var Entry ref actor Begin GameMode foreach Entry <- (GetRefs 42, 1) ; for each NPC in current or adjacent cell let actor := *Entry if actor.GetIsRace SomeRace if (actor.GetItemCount MyTail) == 0 actor.AddItem MyTail 1 actor.EquipItem MyTail endif endif loop End Stick that in standard delay quest and I don't think you'll have any performance issues. Optimally: Skip the loop and quest and use an actor OnLoad event instead.
FwuffyMouse Posted June 19, 2015 Author Posted June 19, 2015 Working like a bloody dream odessa, thank you so much. That "foreach" thing was just what I was looking for, but you actually went ahead and wrote the script too. i'd give you all my internet points if was a such thing.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.