Delzaron Posted April 2, 2017 Posted April 2, 2017 Hi I wish to place 40 skeevers on 4 different places, and to call them back once the quest finish. Ok, I could make lines for each skeever, but it will be an heavy script. I think there is a solution with a while loop, but mine don't work (I can't set an actor). Function SkeeversInvasion1() int i = aNovel_Skeevers1to10.length int pos = -1 while i i-=1 Actor a = toBeAssigned.getActorReference() if !a || a.isDead() pos = i i = 0 endIf endWhile if pos==-1 ; No empty slots debug.notification("No skeever found!") return endIf toBeAssigned.moveto(aNovel_Skeever_InvasionSpot1REF) debug.messagebox("some skeevers are coming")Endfunction
nosdregamon Posted April 2, 2017 Posted April 2, 2017 Green: Set the Creation of a outside of loop. Should be faster. Red: Perhaps using the index is missing? Function SkeeversInvasion1() int i = aNovel_Skeevers1to10.length int pos = -1 Actor a; while i i-=1 a = toBeAssigned.getActorReference() if !a || a.isDead() pos = i i = 0 endIf endWhile if pos==-1 ; No empty slots debug.notification("No skeever found!") return endIf a.moveto(aNovel_Skeever_InvasionSpot1REF) debug.messagebox("some skeevers are coming")Endfunction
vpoteryaev Posted April 2, 2017 Posted April 2, 2017 Summoning of 40 actors/items in single loop can take a very noticeable delay before 1 and 40th. You have to try this. Kind Regards.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.