Random Spawn Location Help!

GameCre8torGameCre8tor Member Posts: 49
edited November -1 in Working with GS (Mac)
Hi guys,

In my game I have a spawn point which spawns an actor. My map is 1,000px X 1,000px. On the spawn point I have a timer with a spawn actor behavior. The X location is "random(1,1000)" and the Y location is also "random(1,1000)

The problem I have is, almost all of the time that my actor spawns, it appears off of the game screen. Does anyone know how to fix this?

Thank you,
GameCre8tor

Comments

  • GameCre8torGameCre8tor Member Posts: 49
    P.S How do you put a screenshot on posts? I have my screenshot but cant post it
  • HawtSawceHawtSawce Member Posts: 42
    I have had simillar problems. Firstly I have been working on iPhone resolution so had to make things for that resolution(960x640 iphone 4 or 480x320 < 4). Also, if you open your spawner entity, there is a drop down menu that says relative to actor by default. You want this set to screen so when it spawns it is referring to screen pixels.

    You mentioned your pixels are set to 1000x1000 max. Why? If it is for iPad that resolution is 1024x768. I assume this is a scroller type game in which case you want this spawn to be off screen perhaps?
  • GameCre8torGameCre8tor Member Posts: 49
    Thanks HawtSawce! By the way I am making the app for the Iphone and ipod touch in landscape mode, and yes it is a scroller both vertically and horizontally.
Sign In or Register to comment.