Moktah Posted February 6, 2018 Share Posted February 6, 2018 an idea I'd like to run past ya Could you get rid of one of the checks in your mod by doing this? if the first reference is ALWAYS your player anywaysthat is IF arSomeArray[0][["actor"] IS AWAYS player/playerrefhow bout skip the first array assignment/check altogether let iIndex := 1 Now you are just looking through your array for your companion references ratherthan yourself. Link to comment Share on other sites More sharing options...
DrakeTheDragon Posted February 6, 2018 Author Share Posted February 6, 2018 Yeah, I could do that to save 3 lines of code, but only if the player will always be at index 0. The actors array is not designed to be that way. It just tracks stats for actors independent of the order in which they're put inside. Right now the Quest script puts the player into it at the very first coming occasion. But there's no telling there're won't be other scripts coming later, which might, due to race conditions or whatever, sometimes happen to come first, before the player, so another actor would take index 0. It's just not safe to assume I can "always" start from 1 for companions I'm afraid. Link to comment Share on other sites More sharing options...
Recommended Posts