GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

spawn actor making too many?

EmrysEmrys Posts: 38Member
Hello,
When my player actor falls off the screen, I have a Destroy Actor rule with a follow up Spawn Actor at start point. Also, my player character is several actors (main body, arms, and legs) that are attached to each other.*

The problem:
When the player character (which is four actors) re-spawns there seems to be duplicates of the body. It is only visible when in motion.
Do you think this is an issue of using several actors to create the player character, or an issue with Spawn Actor?

*There is one invisible actor that has all the collision and rules. Then there is an attribute for tracking position. The body, arms and legs, which have the animations, are linked so that their position is the same as the invisible actor.

Comments

  • StormyStudioStormyStudio United KingdomPosts: 3,987Member
    Would it be possible to change it so when you character falls of the screen, have a timer start and after x number of seconds move his position back to the starting point (or where ever you want him to reappear), its easier on the processor as well. (Spawning used to be pretty processor heavy, though they have improved it a lot).
  • EmrysEmrys Posts: 38Member
    Hmm... that might be an answer.

    On further thought, this is also what I'm doing now, but in the actual game the player will die and restart the level. So maybe I am worrying about a non-incidental anyways.

    I was just wondering if others were have multi-spawn. Since it is likely that I will need to spawn actors in the future for other events, missiles or the like.

    Right now there is an actor below the screen that activates the Destroy Actor upon collision. I'm thinking of replacing that with a if Y position is < 0 destroy actor.

    But that maybe another post.
  • tenrdrmertenrdrmer Posts: 9,934Member, Sous Chef, Senior Sous-Chef
    I have seen spawning do some strange things before especially when multiple actors are spawned at the exact same time. it will prob work much better to use a change attribute in all of you pieces back to the starting point. This will also improve performance of your game since it sounds like you also have a number of constrains on the same actors that are spawning.

    It's not my fault I never learned to take responsibility for anything. ;)

  • EmrysEmrys Posts: 38Member
    Thanks. :)
    More to think about.

    Blimey, this drag and drop programming is trickier than I thought.
This discussion has been closed.