Spawn actors outside of screen

HyryttyHyrytty Member Posts: 39
edited November -1 in Working with GS (Mac)
so in my game i've got dogs spawning all over the place. what i'm trying to do is have dogs with the image facing right to spawn outside of the screen on the left side and dogs facing left to spawn outside of the screen on the right side. And each image walking toward the other side of the screen and eventually leaving the screen (Even though the screen is wrapped for the main dog which the user is controlling. And now my problem is, how do I make the dogs spawn outside of the screen? And how do I make them leave a wrapped screen then eventually destroy them outside of the screen?

Thanks in advance,

Comments

  • HyryttyHyrytty Member Posts: 39
    No one who knows?
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    you can't used a wrapped screen if you want them to leave the screen area. i would instead put a rule that says with the player's actor hits a certain point (480 + 1/2 the width of the dog) change his x position to (-1/2 the width of the dog), and the other way around. that way when he moves 1/2 off screen on either side he will appear on the other.

    then the rest of the stuff is easy. just put in coordinates for spawning of -50, 0 to spawn to the left and 500,0 to spawn to the right. have rules that say when their position hits a certain point to destroy them
  • HyryttyHyrytty Member Posts: 39
    jonmulcahy said:
    you can't used a wrapped screen if you want them to leave the screen area. i would instead put a rule that says with the player's actor hits a certain point (480 + 1/2 the width of the dog) change his x position to (-1/2 the width of the dog), and the other way around. that way when he moves 1/2 off screen on either side he will appear on the other.

    then the rest of the stuff is easy. just put in coordinates for spawning of -50, 0 to spawn to the left and 500,0 to spawn to the right. have rules that say when their position hits a certain point to destroy them

    Great! Thanks
Sign In or Register to comment.