GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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.Posts: 12,822Member

    Just place your limits into the random range.

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

  • honaccountpk@yahoo.com[email protected] Posts: 41Member
    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 Posts: 11,907Member, Sous Chef, PRO, Senior Sous-Chef

    @[email protected].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.