spawning problem

0 favourites
  • 8 posts
  • hi there im trying to spawn enemies on objects by using if minions available is above >0 create object at spawn point 1 and + 1 to spawn point and - 1 from minion spawn pool. then the next code is spawn point 2 is spawn point cod eis 2 and minion is > 0 then spawn image at spawn point 2 and it keeps doing this to 10 then on code ten it sets spawn point back to 1. but for some reason the spawn never goes above 19. if i got 20 or 30 minions available for spawn it only ever does 19 and stops its weird and i dont understand is there a better way to do this. i would provide screenshots but im not home.

  • Could you share your code?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • also if you know enough can u look at my pathfinding ive tryed so many different ways of making it work but i cannot seem to get my tokens to go around images it just collides. so had to disable it

  • I can't actually open your project because I don't have the same plugins that you've got :/

    Can you send a screenshot of your code or perhaps give me a link to where I can view your project?

    I'd love to help you but I can't seem to grasp where the issue is without actually seeing it

  • ... d.png?dl=0 heres alink for a screenshot as im not sure how to put it on here <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • heres alink for a screenshot as im not sure how to put it on here

    So what's messing it up is probably the 'trigger once'. ^^

    So when it goes back to being 1 it's already been triggered once so it won't do so again.

    Try disabling all 'trigger once' events and tell me if that fixes it ^^

  • ill give it ago but the problem is it keeps spawning but always stops after doing 19 spawns so it resets to 1 fine but fails on the second attempt at 10

  • yeah just tested and same problem again which is completely beyond me

    new update i was making the enemies spawns for the other side and i forgot to add a wait timer and i found out it spawn them all okay but pretty much on top of each other. so carried on added the wait timer and trigger once while true to stop it spawning loads while it waits on the timer and it did the same problem as the other side. so im thinking the main problem might be the timer. im gunna try add a new timer and event to try get around it and see if that does the trick. but any suggestions would be great

    another update. i just added another event on the end delaying the reset and timer by 1 more event and it did the same but spawned 20 instead of 19 this time so the problem is around the time for sure. which i think i can get around but if u could let me know what u think the problem is or any other way of fixing it in future that be great to learn

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