Number + function not working ?

Hi guys,

Just dicovered flowlab and I’m really enjoying it so far.
I did a small game where the player have to destroy an npc. Each time the npc is destroyed, it respawns somewhere randomly on the map. I attached a number function as a counter on the output of “destroy” so it can add “+1” to the number for each kill (to add an event when the player kills 10 npcs).
But I can’t find out why the counter works only on the first killed npc, but stays stuck to “1” after that. You can see exactly what I did on the gif here : https://gfycat.com/whoppingclearhorsemouse

I tried to attach the number function to the spawn one. No better.
Did I make something wrong or is there a real bug here ? Sorry for posting this if it isn’t a bug. In this case, could someone point me the mistake I made ?
Also, I wanted to link that number to an event on the player (kind of a berserk mod activation). Is there a way to import a number from another object’s behavior bundle ?

Thanks a lot for this nice software in any case. I tried other game engine but I’m sooo low on dev skills. It’s the first time I easily understand the “flow” of a game with this tool. I can’t believed I made this small game in less than 2 hours by just fiddling around with all the options. Really appreciated. Thanks team !

edit : I just saw the section “help” with all the ressources on your website. Sorry if the answer is in there. I’ll take a look. \(?)/ You can delete if that’s the case.

Could you leave a link to the game?

Sure. Didn’t thought to share it. Here it is :
https://flowlab.io/game/view/1295702

You’ll find the issue in the “dead and spawn” behavior bundle of the enemy object.

I also have another issue. I tried to put invisible collision boxes by adding a solid unmovable object with empty sprite. It worked yesterday but now, all characters can go through it like if there were only a small solid dot on each bloc i put.
edit : and now it works again. I just changed sprite to see the collision boxes. It didn’t helped at first. Characters where still going through, but while I was righting this message, it seems the game reloaded something and now it works again. Maybe Flowlab doesn’t like empty sprites ?

Also another issue I had yesterday, I added extractors to take first position of enemy so it can respawn at the same place with a timer for respawn time (I also tried by linking the spawn function to the output of destroyer so it respawns each time a npc is killed) and it worked but only until I killed a npc on the spawn point. When killing on the spawnpoint, the timer stops and never respawn anything again. Same if it was the destroyer output that triggers the spawn. Weird. I took that on video also, I’ll upload it if you want to investigate. but you won’t find it in the game behaviors, I deleted it after seeing that it wasn’t working. I could easily recreate the issue though if you want.

So, to fix your first problem your probably going to want to have your enemies send a message to a different object when destroyed, that different object will then add +1 to a number.

Invisible blocks worked fine for me, I personally would give them all a full sprite and then automatically change there alpha to zero, makes it easer to navigate and less glitchy

I don’t quite understand your third question, if you want to remake i’ll take a look though.