How do i make the bullets come from the right area

alright, quite simple, i’m making a platformer / cleaning game and i want the bullets from the first boss to actually come from the gun.
problem is, they just disappear when they appear on the boss.
i need a quick fix while i try to work on the cleaning.
here’s the game: SatisFactory Cleaning. - Flowlab Game Creator

1 Like

use emit instead of spawn:


That code will spawn a bullet, nothing more you can use prximity and the point at behavior to get rotation to change the angle. Give me ine minute and i will get you the code

replace the extractors & emitter with your desiered configurations but this is the layout you need:

{"data":{"behavior":{"v":"2","nodes":[{"inputCount":2,"outputCount":1,"name":"Emitter","behaviorType":"logic.components.Emitter","x":0,"y":128,"group":"02f61bf308a28441","id":"210a64f5b594a547","entityClassId":0,"maxAge":10,"force":2,"rotate":false,"angle":0,"independent":false,"oX":0,"oY":0,"pin":false},{"inputCount":2,"outputCount":1,"name":"PointAt","behaviorType":"logic.components.PointAt","x":-180,"y":128,"group":"02f61bf308a28441","id":"210a8a3fbdd7ab42","skipRot":true},{"inputCount":1,"outputCount":1,"name":"Extractor","behaviorType":"logic.properties.Extractor","x":-450,"y":80,"group":"02f61bf308a28441","id":"210ab230a358d94f","targetId":781279128,"prop":"x","version":2},{"inputCount":1,"outputCount":1,"name":"Extractor","behaviorType":"logic.properties.Extractor","x":-450,"y":176,"group":"02f61bf308a28441","id":"210ab6f2e7e34944","targetId":781279128,"prop":"y","version":2}],"links":[{"input_id":"210a64f5b594a547i0","output_id":"210a8a3fbdd7ab42o0"},{"input_id":"210a64f5b594a547i1","output_id":"210a8a3fbdd7ab42o0"},{"input_id":"210a8a3fbdd7ab42i0","output_id":"210ab230a358d94fo0"},{"input_id":"210a8a3fbdd7ab42i1","output_id":"210ab6f2e7e34944o0"},{"input_id":"210a64f5b594a547i0","output_id":"210a8a3fbdd7ab42o0"},{"input_id":"210a64f5b594a547i1","output_id":"210a8a3fbdd7ab42o0"},{"input_id":"210a8a3fbdd7ab42i0","output_id":"210ab230a358d94fo0"},{"input_id":"210a8a3fbdd7ab42i1","output_id":"210ab6f2e7e34944o0"}]}}}

Hope this helps :slight_smile:

also welcome @i_really_do_not_have_a_clue I hope you have fun and make some cool things with flowlab :slight_smile:

thanks! gonna try this now, hope it works.
i also have a second problem, in one level, the bullets aim towards the player, this is supposed to happen, but the next level, they don’t, any ideas on how to fix this?

1 Like

it works, took a moment to understand it, but what matters is that it works.

1 Like

Good, please let me know if you need anything else!

alright, another thing i want to implement is invulnerability frames ( and something to show them )
i only want this for the player and the first boss.

1 Like

sry about not responding. i have been gone for thanksgiving. Im sure your figured it out by now but if not then to create invulnerability then wherever you have your health in your player then make sure ANYTHING that can damage it first goes through a switch. if this is on then your vulnerable if off then your invulnerable. and you can just use a label in the GUI section of behaviors to show that your invulnerable. I hope this helps please let me know if you need anything else!

1 Like