Someone92 Posted August 4, 2013 Share Posted August 4, 2013 sslThreadController Controller actor[] actorList int lengthOfActorList Controller = SexLab.HookController(argString) lengthOfActorList = Controller.ActorCount int i = 0 while i < lengthOfActorList actorList[i] = Controller.GetActor(i) i += 1 endWhile if actorList.Length > 0 debug.Notification("actorList is not empty.") else debug.Notification("actorList is empty!!!!!") endIf When using the code above I get an empty actorList. How do I have to change the code so I get all the current participants of a SexLab animation into said array? Also the function .GetActorS would be nice to have. Link to comment
Ashal Posted August 4, 2013 Share Posted August 4, 2013 You don't need a .GetActorS(), you can just access the Positions property. actor[] actorList = Controller.Positions Link to comment
Ashal Posted August 4, 2013 Share Posted August 4, 2013 and while this is completely useless since you can just use the Positions property in it's place: int i = 0 while i < lengthOfActorList actorList[i] = Controller.GetActor(i) i += 1 endWhile Wouldn't work because you haven't sized the actorList array. So it will always return as none until you do, as any attempts you make at filling it's non existent indexes will fail. Link to comment
Someone92 Posted August 4, 2013 Author Share Posted August 4, 2013 You don't need a .GetActorS(), you can just access the Positions property. actor[] actorList = Controller.Positions Ah, I've seen the Positions variable but I didn't noticed it was a property; you should add that to the "Property List" here: http://git.loverslab.com/sexlab/wikis/sslthreadmodel-script Wouldn't work because you haven't sized the actorList array. So it will always return as none until you do, as any attempts you make at filling it's non existent indexes will fail.Oh, didn't know that; thought Papyrus would automatically make the array as long as the latest non-None entry. Link to comment
Ashal Posted August 4, 2013 Share Posted August 4, 2013 Wouldn't work because you haven't sized the actorList array. So it will always return as none until you do, as any attempts you make at filling it's non existent indexes will fail.Oh, didn't know that; thought Papyrus would automatically make the array as long as the latest non-None entry. If only. The fact that it doesn't is exactly why the xxxPush and xxxArray functions exists in the sslUtility script. http://git.loverslab.com/sexlab/wikis/sslutility-script In the case of what you were trying to do with the loop, this would've worked: int i = 0 while i < Controller.ActorCount actorList = sslUtility.PushActor(Controller.GetActor(i), actorList) i += 1 endWhile Or just more simply just use the Positions property. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.