How can I limit the area and the speed of spawning of an actor?

I want to limit random spawning of my actors within the frame of my game user interface area.
But I dunno how to limit it.

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    Just place your limits into the random range.

    So for example x = random (200,600) . . . . y = random (200,400).

  • honaccountpk@yahoo.comhonaccountpk@yahoo.com Member Posts: 41
    edited October 2014

    I just want to limit it within a specific area.
    1. I need to limit it because I don't want them to overlap most of the time.
    2. I need to limit it also because of other gui controls during gameplay.

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @honaccountpk@yahoo.com said:
    I just want to limit it within a specific area.

    @Socks explained how to do this. Do you have a question about what he wrote?

    1. I need to limit it because I don't want them to overlap most of the time.

    Preventing overlap is more complex than limiting spawning to a certain area. I guess we'd have to know more about what you want to have happen. A screenshot or sketch of the game is really helpful.

    1. I need to limit it also because of other gui controls during gameplay.

    This would be accomplished with the x/y range of the spawn behavior, as @Socks suggested.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.