how to do limited spawn

0 favourites
  • 8 posts
  • Ok i get that I need global variable of say 3 and each spawn decrease that amount by 1 until 0. I understand that perfectly.

    Its this next part that I am having trouble I want each of the monster to spawn on its own Square tile that I place Such as Mplacementtile times 3 which should result in each monster place on the tile once three times. Problem is that when dealing with layers such as level one or level two with layer effect. I do not see or know how to tell the stupid Object to delete the invisible when the layer is invisible. As i understand Even If the object is on the layer has been turn invisible Is actually still visible According to the engine. So i cant get rid of the excess Mplacement tile.

    In other word I Am trying to see a way to cutdown on both CPU from excess "visible" layer invisible object. So I am trying to get the spawn code to work so that I can just spawn the monster instead of placing Thousand of them with hundred of layer And not looping a destroy for every stupid layer. If there a way to do this with just spawn only three monster Id like to know

    If you need me to do picture to explain it better

    Update: I found that one of my code that was hidden away was destroying the sprite after it was created move along I feel really dumb

  • would adding a "layer is visible" condition help to only spawn on the visible layer?

  • How would i go about to doing that one ? Ok so i did a test run with your idea. I didnt work. It did indeed spawn but It should only spawn that layer not the other layer as well. This is hell trying to figure out to spawn it correctly

    Btw I am having another problem the Mplacement tile is not correctly checking. Like it work fine for the first level but when I go to pick level 2 layer It won't Use the next set of three. It like the code is in love with the first three?

  • So you're using layers to differentiate between different levels of your game instead of layouts? How are you using the word level when you say "level one or level two" in your first post? Like Mario Bros. where you go from level to level, or like a building where each floor or story would be a level? If you need to switch back and forth quickly between the different levels, I could see using layers, but otherwise I'd recommend using layouts.

  • thing is the dungeon will be multi-story with a final layer to miniboss and id like to have the player to have access to prievious layer but id also like to have random level layout and have it seem alway different everytime they go in so that the player can’t use a guide to beat my game in 5 hrs or something and to provide alway something new to last for hours

  • thing is the dungeon will be multi-story with a final layer to miniboss and id like to have the player to have access to prievious layer but id also like to have random level layout and have it seem alway different everytime they go in so that the player can’t use a guide to beat my game in 5 hrs or something and to provide alway something new to last for hours

  • Hey, how about creating an array, with the co-ordinates of the spawn locations, and a section with the UID of the object it spawned. Then "on destroy" of one of these spawned objects, check its UID and clear the UID section of the array.

    Every X seconds, check if there are any arrays with an empty UID section and spawn one, repeat.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Rory I think i know what you talking about. But I never did use array in that way. and you gave me an idea Is it possible then If i could grab the specific UID of the spawn location ? Another question is that IF i do end up doing a destroy function the location of the spawn Will it affect how the UID is counted ? And If I am reading this right How would i go about clearing UID and doing a hard reset.

    Sorry Rory But i havent done that scale and I would like to see examples on If and how to implement it. I been following the basic tutorials. And i do not think there is one i can follow.

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