spawning problem

Get help using Construct 2

Post » Sat Sep 17, 2016 2:56 pm

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.
B
16
S
5
Posts: 139
Reputation: 1,652

Post » Sat Sep 17, 2016 4:02 pm

Could you share your code?
B
13
S
3
G
1
Posts: 41
Reputation: 1,466

Post » Sat Sep 17, 2016 4:24 pm

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
Last edited by darkrealos on Sat Sep 17, 2016 6:53 pm, edited 1 time in total.
B
16
S
5
Posts: 139
Reputation: 1,652

Post » Sat Sep 17, 2016 4:46 pm

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
B
13
S
3
G
1
Posts: 41
Reputation: 1,466

Post » Sat Sep 17, 2016 5:10 pm

https://www.dropbox.com/s/7g32557lacf65 ... d.png?dl=0 heres alink for a screenshot as im not sure how to put it on here :D
B
16
S
5
Posts: 139
Reputation: 1,652

Post » Sat Sep 17, 2016 6:09 pm

darkrealos wrote:https://www.dropbox.com/s/7g32557lacf65g3/Untitled.png?dl=0 heres alink for a screenshot as im not sure how to put it on here :D

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 ^^
B
13
S
3
G
1
Posts: 41
Reputation: 1,466

Post » Sat Sep 17, 2016 6:24 pm

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
B
16
S
5
Posts: 139
Reputation: 1,652

Post » Sat Sep 17, 2016 6:29 pm

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
B
16
S
5
Posts: 139
Reputation: 1,652


Return to How do I....?

Who is online

Users browsing this forum: dop2000, tarek2 and 9 guests