Multi-Resolution Game Development With GameBuilder Studio Check it out!
NEW Version 0.9.7 has arrived! New Blazing Fast Particle Engine & More Game Actions. Check it out
How do you spawn coins in order or in a custom pattern?
  • I need some help. I want to spawn coins in order. Now i spawn coins randomly every 0.3 seconds all over the screen. Its any way in GBs to spawn coins in order. Maybe to spawn in letter M or make a words with coins?

    Thank you for any advice
  • 4 Comments sorted by
  • Sure, there are several ways to do so. If you plan to do it often with different letters/patterns - I probably would place some invisible (renderer alpha=0) "spawn-point-objects" on screen. Think of it as an LED-letter-display like this:
    image
    Ad some logic to activate them on any kind of action you like (time, player position, highscore...). You probably want to do some excel-sheet with their names to see which one to activate depending on what you want to "write" with them.

    As an activation logic, I would do a DataContainer in a global object with as many variables as there are spawners (like A1=0, A2=0...). The objects need a rule to spawn a coin if their variable is set to 1, after they spawned the coin, the same rule can set it back to 0.
    This way you can make patterns/letters appear by just changig the needed variables to 1 (like A1=1, B2=1, C3=1...).

    If you don't plan on do it often, you could just use the needed x/y-cordinates for as many coins as the letter needs in the spawn logic.
    Or you could "write" the letter with the coin-objects in the builder off screen and move them on screen when needed with a rule.

    But maybe someone has a better idea.
  • Great thank you Cavaron for ideas and suggestions, of course will give a try! Master Lavon any idea from you maybe? :)
  • @Xman Cavaron has a good idea if you want to spawn coins in the shape of a letter.

    Make sure to create a base entity called DefaultCoin (or whatever) and clone all other coins from that base entity if placing multiple coins manually in-editor so that any changes to the base coin can be propagated down to all clones. This will save you time if you have a lot of coins and don't want to do duplicate work in-editor.
  • @Xman this may become easier when we add paths to GBs then you could get a list of points from the path and loop through them and spawn an entity at each point's position.

Howdy, Stranger!

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

In this Discussion