Need help, don't want actors to spawn in the camera zone

liamoliamo Member Posts: 191
edited November -1 in Working with GS (Mac)
hi guys, how would you make it so that the actors with random spawning behaviors don't spawn in the camera zone, i have pits and rocks and it wouldn't be good if they spawned right underneath or behind the actor. My game is an endless run and jump game.

cheers.

Comments

  • AsymptoteellAsymptoteell Member Posts: 1,362
    Make it spawn to random(camera origin x+a distance greater than scene width, camera origin x + a distance greater than last distance)

    That should do it.

    Asymptoteell
  • liamoliamo Member Posts: 191
    thank you
  • AsymptoteellAsymptoteell Member Posts: 1,362
    Sure thing.
  • liamoliamo Member Posts: 191
    Asymptoteell said:
    Make it spawn to random(camera origin x+a distance greater than scene width, camera origin x + a distance greater than last distance)

    That should do it.

    Asymptoteell

    What do you mean a distance greater than scene width?
  • AsymptoteellAsymptoteell Member Posts: 1,362
    The width of your scene, 420 if it's for iPhone. You need a number bigger than that.
  • liamoliamo Member Posts: 191
    my scene is 2360 for width, a number bigger than that? or a number bigger than the camera width, sorry if i am not getting it and thank you for your patience.
  • liamoliamo Member Posts: 191
    Bump
  • liamoliamo Member Posts: 191
    Double bump
  • liamoliamo Member Posts: 191
    Triple bump, A number bigger than the camera width or the scene width of 2360?
  • part12studiospart12studios Member Posts: 620
    can you setup some kind of exclusion? for example.. allow spawns to occur anywhere inside the 2360, but wherever the camera is, don't allow..

    might even be two dynamic spawn areas.. one to the left and right of the camera.. each time a spawn occurs, it checks where the camera is in relation to the whole scene.. i'm still learning a lot of this myself, but maybe this is possible?

    good luck! :)
Sign In or Register to comment.