Create Objects for every TiledBG is used?

0 favourites
  • 5 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • I use tiled background objects for my plattformer to walk on. The idea is to create rounded stones on the sides of the tiledbackground(blue) to make it look more natural. I have done it by hand for now, but I guess the best solution is to create them by the system. The problem is, that it only works for one tiledbackground.

    The code I used is simple:

    on start of layout:

    System create object "sprite_left" on layer 0 at (TiledBackground.X,TildedBackground.Y)

    System create object "sprite_right" on layer 0 at (TiledBackground.X+TiledBackground.Width,TildedBackground.Y)

    Here is my capx:


    I guess there must be something like:

    On start of the layout:

    System create object <?for every tiled Background?>:

    System create object "sprite_left" on layer 0 at (TiledBackground.X,TildedBackground.Y)

    System create object "sprite_right" on layer 0 at (TiledBackground.X+TiledBackground.Width,TildedBackground.Y)

  • it's very common in other game makers, they call it as tileset, where you'll have the corners, middle, bottom and top with different contents, when you paint the scenario with the selected tile, it'll detect the corners, the sides, the middle and will fill them with the right image.

    I think C2 is good with his simple system, because doing the tiled system of RPG Maker don't give you the freedom to create the scenario in Coreldraw and import it, for example.

    I prefer to manipulate mosaics outside the Game Maker software because revisions show be ease than edit them inside. But it's a personal preference.

    But, C2 really need improvements around the layers and Z ordering, or Our job will become hard to maintain, for example is when you edit a middle ground on a finished scenario, you can't select it if you place grass over it, so, in complex scenarios, select a smaller thing between 3 or 4 objects can hurt your mind.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • TastyBytes You guessed correctly, just add the for each as a sub event to on start of layout.


    Start of layout

    -for each tiled bg, create left, right sprite.

  • newt: Really such easy? <img src="smileys/smiley3.gif" border="0" align="middle" />

    I have to try! Thank you!

  • tested: Works fine!

    Thanks again!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)