Reflect Shot Kill
I am trying to make a mechanic in which an enemy's fire can be knocked back at it with a melee weapon, and kill it when it hits. The enemy has an aimed shot based on VectortoAngle. However, I cant think of a satisfactory way to make his own shot kill him. If i make it on collision, than no matter how i position the shot, wont he kill himself more than half of the time? (one option would be to make the Spawn location on a sort of arc outside the collision box so that its always shooting from outside the actor and wont intersect, but i'm not sure of how to do that.) If i make it a boolean based on the reflecting by the player's weapon, it would destroy any other of this enemy on the screen. I can't think of how to make it a localized boolean. If i destory the shot and replace it with a new actor, I don't think it will rebound satisfactorily. If any of these options can be made to work, they'd solve it, so please, any suggestions would be welcome.
Comments
Yeah, if the bullet is being reflected back it would only hit him if it hit the melee weapon at just the right angle, you need to bring in some other mechanic to help the bullet get back to him . . . . .
Also, when initially spawning he bullet - spawn it just outside of the gun, a single pixel will do, this prevents the bullet blowing up the gun !
Ok, that's good to know, thanks, but unfortunately doesn't solve the problem I want to chase first, which is the "i spawned a bullet inside me, whoops dead" issue, I'm afraid. Is there a good way to , using Spawn and destroy, make a new type of shot that reflects backwards at the same speed and angle it went out at?
You could simply use Interpolate to bounce the bullets back . . . . like this:
Video is private. But that still doesnt solve the problem of the bullets colliding with the enemy as soon as he spawns them.
File for the above project:
Link: https://www.mediafire.com/?71219f165vv1746