Jump to content

Some issues with the ThreadController functions


Recommended Posts

	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

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

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

 

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

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use