Say I wanted to perform the same operations on a number of properties of the same type in a script. My first inclination would be to create a function that takes that type as a parameter and call it with each of the properties. For this to work the function would have to be passing the properties by reference so that the properties remain changed after the function is done.
My questions are:
1) Would this work? If so, is there anything special needed to make sure the properties are passed by reference and not passed by value?
2) Is there a better way to do this?
Example:
...Actor property ActorBase autoActor property Actor1 autoActor property Actor2 autoActor property Actor3 autoObjectReference property Origin autoint[] property Position autoFunction MyFunction() Helper(Actor1) Helper(Actor2) Helper(Actor3)EndFunctionFunction Helper(Actor actor) actor = Origin.PlaceAtMe(ActorBase) ;fill each ActorX property with a copy of ActorBase actor.MoveTo(Origin, Position[0], Position[1], Position[2]) ;move each ActorX property to the location specifiedEndFunction;Doing other things with the updated ActorX properties here...
Side Note: Not sure if what I have inside the Helper function above would actually work, so if you have feedback on that feel free to give it as well.