Passing Values between actors
XanthorXIII
Member Posts: 8
Is it possible to pass values between actors without using the Game Attributes to pass the values? I'd like to have an Actor that when it Spawns another Actor sets the values on that actor.
So in this case, a Spawn Behavior that can set attributes on another actor, or just having the ability to set Attributes on another Actor.
Thanks.
So in this case, a Spawn Behavior that can set attributes on another actor, or just having the ability to set Attributes on another Actor.
Thanks.
Comments
The angle of rotation should be the data you want to transfer, and of course it should be between 0 and 359, and the spawned actor should change his rotation angle to 0 right after he reads it (maybe even spawn him with alpha=0, then change to 1 after correcting the angle).
It has limitations but its a nice way to do thing quickly.
Hope that helps.
I also may re-think my approach to this problem.
This would be a great idea for GS 1.0.
Prototype Actors cannot do this.
Drag two instances out into the Scene, double click them to open their properties, and click the padlock to break the Prototype-Instance bond. In the Rules for this Instance, you will have access to everything in the Scene.
My latest GS game, The Secret of Grisly Manor, was made using this technique. It only uses 12 Prototype Actors for the entire game. Although this does require some planning, you do not need a million game attributes to accomplish what you want. Actors can directly control other Actors.
The only limitation with this is spawned Actors. Newly spawned Actors will not be known to the Instances in the Scene.