03-27-2022 05:34 AM
04-25-2022 10:04 AM
I have not found a way to pass lists in whole so what I've done instead is create a send event that will iterate through the list and a listen event on the target object that will build it's own list on the destination. It's a bit more tedious but it's worked in all of the instances I need. If you want it to reset the list on the destination, in the send event if you have a free parameter use a boolean and then you can simply say on item[0] send reset=true but on all other items reset=false and have the capture event process that accordingly. If anyone knows of a better way to do this, I'd love to update some of my scripts.
06-07-2022 04:03 PM
Cool workaround! Any chance you could share what that code looks like? I'd love to do something like this.
06-08-2022 03:24 PM
Sure. Using OP's ask as an example.
Object 1 has a list of vectors named ListVects and is tied to a script VectLists.
Object 1 has a variable called GameCtrl which is defined on the object itself to point to the GameController
Object 2 is a controller named GameController and is tied to a script GameScore
Object 2 has a list of vectors variable named RcvdListVects
Code on VectLists
On World Start (or whatever triggers the event with the object 1 which contains the list)
When event GrabList is received with Iterator
Code on GameScore
When event SendList is received with Vec(ReceivedVec) and Int(Iterator)