I need help for my new game

how do i make it to where my gun aims to wherever my mouse points and also shoots towards the same position

2 Likes

Here

{"data":{"behavior":{"v":"2","nodes":[{"inputCount":0,"outputCount":2,"name":"MouseMove","behaviorType":"logic.triggers.MouseMove","x":-1170,"y":-80,"group":"","id":"fc9c36c8e15bcb4d","gameCoords":true},{"inputCount":2,"outputCount":1,"name":"PointAt","behaviorType":"logic.components.PointAt","x":-990,"y":-80,"group":"","id":"fc9c4b606f2fbb48","skipRot":false},{"inputCount":1,"outputCount":1,"name":"Extractor","behaviorType":"logic.properties.Extractor","x":-1170,"y":8,"group":"","id":"fc9c84600101a345","targetId":0,"prop":"x","version":2},{"gateVal":0,"mode":"greater than","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":-990,"y":0,"group":"","id":"fc9c951807ec7b45"},{"inputCount":3,"outputCount":3,"name":"Flip","behaviorType":"logic.properties.Flip","x":-810,"y":8,"group":"","id":"fc9cba2961bfbd4d","vertical":true,"spriteOnly":false},{"inputCount":0,"outputCount":4,"name":"MouseClick","behaviorType":"logic.triggers.MouseClick","x":-1170,"y":-200,"group":"","id":"72311e67c2f6f14f","global":true,"rightClick":false,"skipAlpha":false},{"inputCount":2,"outputCount":1,"name":"Emitter","behaviorType":"logic.components.Emitter","x":-990,"y":-200,"group":"","id":"72312a8759ada547","notes":"Set this to what you want to shoot","n_o":1,"entityClassId":0,"maxAge":10,"force":2,"rotate":false,"angle":0,"independent":false,"oX":0,"oY":0,"pin":false}],"links":[{"input_id":"fc9c4b606f2fbb48i0","output_id":"fc9c36c8e15bcb4do0"},{"input_id":"fc9c84600101a345i0","output_id":"fc9c36c8e15bcb4do0"},{"input_id":"fc9c951807ec7b45i1","output_id":"fc9c36c8e15bcb4do0"},{"input_id":"fc9c4b606f2fbb48i1","output_id":"fc9c36c8e15bcb4do1"},{"input_id":"fc9c4b606f2fbb48i0","output_id":"fc9c36c8e15bcb4do0"},{"input_id":"fc9c4b606f2fbb48i1","output_id":"fc9c36c8e15bcb4do1"},{"input_id":"fc9c84600101a345i0","output_id":"fc9c36c8e15bcb4do0"},{"input_id":"fc9c951807ec7b45i0","output_id":"fc9c84600101a345o0"},{"input_id":"fc9c951807ec7b45i0","output_id":"fc9c84600101a345o0"},{"input_id":"fc9c951807ec7b45i1","output_id":"fc9c36c8e15bcb4do0"},{"input_id":"fc9cba2961bfbd4di1","output_id":"fc9c951807ec7b45o0"},{"input_id":"fc9cba2961bfbd4di0","output_id":"fc9c951807ec7b45o1"},{"input_id":"fc9cba2961bfbd4di0","output_id":"fc9c951807ec7b45o1"},{"input_id":"fc9cba2961bfbd4di1","output_id":"fc9c951807ec7b45o0"},{"input_id":"72312a8759ada547i0","output_id":"72311e67c2f6f14fo0"},{"input_id":"72312a8759ada547i0","output_id":"72311e67c2f6f14fo0"}]}}}
1 Like

So, i will get you a screenshot, but you use the mouse move behavior, then run it into the pointAt behavior, then make sure mousemove has use game coord. on.

Ahh… better idea! I was going to give him a screenshot.

1 Like

imported it and nothing apeered

2 Likes

Its there just farther away than your code

1 Like

i legit cant find it anywhere which direction is it in

2 Likes

ill give u a screenshot…

image

Few tips, make sure your gun or what your pointing’s direction is the one you want to emit on.
Also make sure game coords. are on in mouse move. In this case, the direction in the sprite is selected as ‘right’. Also if your shooting a projectile (ex. missile), you’ll want to change in emit, the rotate sprite.

what if i wanted it to do a circle around the player kinda like the cold hard steel game

1 Like

Use an attacher, to attatch the gun* to your guy.
(*or whatever your using)

is is attached but it stays in one place

my guy is movable though

I just added the attacher into your guy.

i forgot to make the gun moveable -_-

also change the guns direction to the left and maybe switch the gun face to the left on the left side.

Also, nice game by the way!