When spawning an actor...

rebumprebump Member Posts: 1,058
edited November -1 in Working with GS (Mac)
...it would be awesome to be able to set (or pass in) a value to a user-defined attribute of the actor instance that is being spawned. This would allow more re-use of a given actor instead of multiple prototype versions of the same actor or crazy actor prototype rule logic trying to circumvent the lack of said passed in parameters.

Comments

  • BeyondtheTechBeyondtheTech Member Posts: 809
    I know what you mean.

    I use Game Attributes to pass variables between the current Actor and the Spawning Actor.

    The first Behavior of my Spawned Actor is to grab the Game Attributes and set them in Actor Attributes.

    It's a little more convoluted, and it may have some issues when two items are spawned simultaneously. But, it seems to work as needed.
  • rebumprebump Member Posts: 1,058
    Yeah, and that is what I am doing but if you really want any full re-use of those spawned actors, passed in values would be easiest. I'm working on something currently that could really benefit from such a methodolgy.

    The game attribute method you and I are using really is limited and gets funky (in terms of logic) if you are using the spawned actor to spawn groups that may need to act similarily and maybe even transform to an alternate group behavior in unison.

    You can take an existing actor and create a few alternate versions for the groups and that helps but there are still limits to what that allows without some crazy rule logic to allow group transformations (i.e. wave two is decimated so wave one transforms to wave two and wave one respawns but you are changing things other than just simple positioning).

    It's hard to explain since there is some almost circular logic in what I was hoping to do. The solution gets a bit kludgey instead of elegant as this situation would normally allow.
Sign In or Register to comment.