# Closed (Emit angle)

Yet another help request,

I am making an enemy. The enemy needs to fire towards the player without pointing at it (The player object). I have the globals but there is only one input for angle. I feel like there’s some super-simple way of fixing this, but I just can’t find it.

I have most of the behaviors and objects set up, I just need to know how to get these:

Into here:

-Ember.Y

1 Like

Use either a “point at” that uses the x/y, or simply make an invisible turret attached to the enemy that shoots for it.

2 Likes

Is there any way that doesn’t use another object?

I might.

1 Like

I don’t believe the “pointat” block actually changes the sprite, it just converts the numbers to angles.

1 Like

The bullets don’t fire at the player. I think it’s the point at. No, it still doesn’t work.

@meburningslime

1 Like

connect the point at to the angle.

2 Likes

Oh, the rot output?

1 Like

yes

1 Like

Never mind, thank you Kasmir and Me Burning Slime for your help!

2 Likes

No problem. Make sure to mark the answer as a solution so others know it’s solved!

1 Like

I know this is already been solved, but an easy and simple way i generally go about this is on Once, the bullet extracts the players X and Y, then rotates to the correct angle. Then you could also adjust the speed by changing the velocity value.

3 Likes

That’s also a lot laggier if it’s a bullet h.ell though.

I don’t think he stated it was a bullet ■■■■ game, so I suggested this. Plus I don’t think it would lag the game at all since it only detects the players location only once on spawn.

This could also be achieved with a proximity and a point at to change the angle. I’ve used these methods many of times for simple gunfire of both enemies and players and haven’t had issues, but then again, I haven’t pushed the limits.

2 Likes

You could also send the player angle through the emit input.
Then the bullet can extract the starting value to set the rotation.

1 Like

I think the way Kasmir mentioned is just fine. It takes minimal cade and works as I need it to.

Never mind…It just bugged. The enemy only fires towards the player when they’re to the enemy’s right.

I tried what @JR01 mentioned but the enemy shoots to high now. The player messages the globals to the enemy, that puts them directly into the angle input.

The enemy bullet is the tiny red dot.

I said through the “emit” input…
Any values sent through emit or spawn can be extract by the “starting value” of the spawned object.

If you use the angle input normally, make sure you have “set angle as dependent” checked.

1 Like

Oh, ok. Thanks, JR01! This really helped.

Thanks to @meburningslime, @ManiacPumpkin, and @Kasamir.

The solution goes to JR01, he solved the final problem.

-Ember.Y

1 Like