spawn actor multiplications

ledbugledbug Member Posts: 7
edited November -1 in Working with GS (Mac)
hello, I have a problem with actor (little platform) who multiplies each time he appears on the screen. First spawn 1 platform, second time 2 platforms, third time 4 platform. Can anybody explain me this?

Comments

  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    What does spawn the actor?
    What is the rule that spawns the actor?

    You have probably set up a rule, which causes this or you added the rule to the wrong actor.
  • ledbugledbug Member Posts: 7
    this little platform has to move from left to the right. then I made a timer for this platform which is set to spawn actor every 5 second. I wanted that this platform appears every time in the same position on the left on the screen but i found out that when the platform moves there is another platform that appears on the top of first platform and so on. I think that I don't understand really spawn actor and how to set his position. Can you explain me?
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    Spawn actor means, that one actor spawns another actor.
    It doesn't mean, that the actor respawns on that spot again.

    If you add spawn platform to the platform, it will spawn little child platforms every 5 seconds on top of itself and because they all have this rule, they will also spawn little child platforms every 5 seconds.

    What you need is
    change attribute: self.X to 200 (if you want it to be respawned at the X 200)
  • mithraweptmithrawept Member, PRO Posts: 167
    Are you spawning the same actor you are spawning from? In which case, each actor you spawn, will spawn again, eventually making loads of copies of itself. This can be difficult to see happening where, the actors spawn on top of each other.

    Suggest that you copy your character and remove the spawn rule from the copy. Then have the original spawn the copy. That should do the trick and be less resource hungry.
  • ledbugledbug Member Posts: 7
    Thanks a lot. It works perfectly with change attribute behavior. Great :)
Sign In or Register to comment.