Spawn Actor Behavior Work Around

osucowboy18osucowboy18 Member Posts: 1,307
edited November -1 in Working with GS (Mac)
Hey everyone, I noticed there were several people on the forum who discouraged using the Spawn Actor behavior. I realize I'm probably going to sound retarded when I ask this, but oh well. How do you avoid spawning an actor when you need the outcome that using the Spawn Actor behavior brings? Thanks.

- Alex

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You can place that actor that will be spawned off camera and setup a game attribute that will tell that actor to "spawn" in a certain place by doing change attributes for the x and y positions. and sometimes you can get away with placing it in the spot you want and just change alpha to 0 and then when it needs to spawn change alpha to 1

    I have even been messing with essentially more than one actor in the same actor. I have a plane that when shot explodes. However instead of destroying the plane actor and spawning an explosion. when the plane is shot I start an explosion animation and change all actor sizes to match the explosion and when the explosion reached the last image in the animation the whole actors alpha changes to 0 and keeps moving the same as if it were never hit its just invisible. and when t gets off scene it resets all attribute back to the plane sizes and is sitting ready to go for the next run across the screen.

    Hope that helps. Also all of the menus in my bubble ball template are tiny of screen and transparent until a menu attribute is triggered where they all pop into place and appear to pop up just like a real menu system.

    Hope that helps
    Aaron

    ___________________________________________________________________________________
    BubbleBall Template HERE!!

    AppSolute Entertainment on Facebook
  • wayneh001wayneh001 Member Posts: 300
    Hi,

    You would be better off having Actors placed off screen, on the Scene. Instead of SPAWNING, move the offscreen actor into position, then if required move the actor offscreen again for further repurposing.

    Spawning Actors has various effects: Frame Rates can suffer, Memory can build up and over time your game may become un-responsive. Additionally, excessive Spawning, can sometimes lead to unexpected results.

    The advice for now is to try and implement re-useable Actors. Darren (Utopian) has produced many examples and Templates demonstrating the technique. Once mastered, you rProjects will run faster, smother and with less memory.

    ...oh, and what tenrdrmer said :-)
  • osucowboy18osucowboy18 Member Posts: 1,307
    Thanks guys, it looks like I have got some work to do :)

    - Alex
Sign In or Register to comment.