How to emit like this?

How to emit the direction my mouse clicks?

I have made it attach a block to your guy and it connected to r a ā€œPointAtā€ in behaviors, and that is the object that emits, let me get you a screenchotā€¦

Use the ā€œAngle-Toā€ bundle in this example.
Mouse (X & Y) ā†’ AngleTo ā†’ (Angle) Emit

This is the block that rotates to where your mouse isā€¦
image
This is the guy that attaches the block that rotatesā€¦
image

And make sure you have the alpha hooked up! Otherwise you can see it.

This sometimes dont shoot the right way

But i didnt try JR_1 one yet

They both dont work. Sometimes they dont go the right way and sometimes they go the opposite way.

And for some reason it keeps crashing

ok nvm it stop crashing. but it still dont work.

You didnā€™t use my ā€œAngleToā€ Bundle.

Use the bundle in that example, but with the mouse block (set to game cordinates).

It still dont work. [20 characters]

Plz help :persevere:

Help me plllllzzzzzzz

Like this:

2021.03.18-12.49 (2)

1 Like

I donā€™t understand i did it correctly. And it still dontā€™ work. And this been going for four hours now.

Object name: gun

Help my dude out. This was made 6 hours ago. I wish i can help but iā€™m new and cant help cuz everything is new to me.

Ok, I made this quickly, but have one problem, the shots face the opposite way your mouse is. I will work more on it tomorrow, I am running out of time. (and my sprites are bad also because lack of time.)

1 Like

Why did you make your own bundle?.. (ć£ Ā°Š” Ā°;)ć£
It uses math that needs to be copied exactly.

Just copied and import the bundle into your game, I just did it and it works fine.
After you import the bundle set the Emitter to ā€œAngle is Independentā€

Let me make a How To Import poster right quickā€¦

This is how you import code:

This topic seems like chaos lol

2 Likes