Author Topic: Deflector  (Read 13496 times)

Deflector
Return To Sender

Description
Inspired by the Team Fortress 2 Pyro's airblast and the repulsion kick in the Ballistix levels of Crash Bash, this weapon is capable of sending projectiles back at the jerks who might be firing at you, but more likely it will bounce it off into nowhere.

It will only reflect projectiles you are looking at. If you don't hit anything with it, you have to wait one second to use it again. If you do reflect a projectile, you can use it again instantly. It may be difficult to use on bullets, but slow-moving projectiles like rockets should be easy.

Features:
Deflects Projectiles
Neat sound effect
Yellowish-Lime-Green Printer Model(May get confused for horse ray)
Ring effect
Can send them back even faster than they were fired at you.

Quick Update:
Changed the way speed of the reflected shot is calculated.
Close projectiles are now directed back to the sender, instead of in their general direction.
Made the sound a bit quieter.

V2:
Sweet new model by Pandan.
Bugfix in reflection code.
Change the way speed is calculated again.

To-Do list:
Maybe add support for Homing Vector shots.

Screenshots

Download
Weapon_Deflector.zip (Last Updated: Wed May 13, 2009 4:33 am)

Installation
Put Weapon_Deflector.zip into the Add-Ons folder in your Blockland folder.

Click Here to view this file on the RTB Download Manager
« Last Edit: May 13, 2009, 08:35:48 AM by -Jetz- »

:D I've been needing this.

Hmm I might DL. Looks interesting enough.

YAYAYYYA looks nice, Downloading
« Last Edit: May 08, 2009, 03:05:00 PM by zuffer »

You're not carrying over the original projectile's remaining lifetime.  This could allow projectiles to be "deflected" indefinitely.

Dude image two guys
one has mini-nuke
one has deflector
the guy with the mini-nuke is on the bed and the other is on the floor
The guy with the mini-nuke fires at the other then...
the other guy uses deflector and that guy is pwned
awesome will DL

so... you have to shoot the projectile to deflect it?

it might be a good idea to have a really big projectile- it might be easier to deflect that way

New model, you need one.

the other guy uses deflector and that guy is pwned
So, when he used deflector he pwned himself?  :cookieMonster:

New model, you need one.

Ill make one when i get home. And i will propose it to him :3

You're not carrying over the original projectile's remaining lifetime.  This could allow projectiles to be "deflected" indefinitely.
Or until someone slips up and gets hit, or until the more likely incident of it getting deflected off into space. Also, the ability to redirect something back at whoever shot it would only work if the projectile had existed for less than half of its lifetime.

so... you have to shoot the projectile to deflect it?
It uses a makeshift connical search to detect projectiles. I don't know if it perfectly aligns with the particle, but it works pretty well.

New model, you need one.
Yeah, the printer is a bit overused, but I try to avoid forcing people to download stuff.

Ill make one when i get home. And i will propose it to him :3
As said above, I try to avoid long downloads, but if it is simple enough, I may implement it.

One thing is that this reflects the projectile along where it is compared to you, which makes it very hard to aim. Just reflecting along the aiming (muzzle) vector makes much easier to aim at targets and use in combat, if a little unrealistic. That's how the TF2 Airblast worked, anyway.

Also, use %projectile.getVelocity() instead of the muzzleVelocity - it won't work right for gravity-affected or event-based projectiles.

You're not carrying over the original projectile's remaining lifetime.  This could allow projectiles to be "deflected" indefinitely.
Possibly better. I made a version of 'Pong' using deflected rockets using a mod on my own server that was quite similar to this a few days ago (it affected the Push Broom) - if the rocket magically disappears after five seconds, then it's harder to end a round or make similar games where people keep firing rockets at each other until they miss a shot and get hit.

It doesn't seem to be possible to deflect non-armed HE Grenades, though. It's either the timing not working with the radius search or me being bad at aiming :cookieMonster:

EDIT: Which could actually make for a neat "Don't drop the ball" kind of game - if you miss it explodes and you die.
« Last Edit: May 07, 2009, 11:53:04 AM by Space Guy »

I think the model fits well but the color of it doesn't.

I'd recommend keeping the printer model but changing the colours to dark orange or dark blue.

I think the model fits well but the color of it doesn't.

I'd recommend keeping the printer model but changing the colours to dark orange or dark blue.

Color meaning? lol

One thing is that this reflects the projectile along where it is compared to you, which makes it very hard to aim. Just reflecting along the aiming (muzzle) vector makes much easier to aim at targets and use in combat, if a little unrealistic. That's how the TF2 Airblast worked, anyway.

Also, use %projectile.getVelocity() instead of the muzzleVelocity - it won't work right for gravity-affected or event-based projectiles.

It doesn't seem to be possible to deflect non-armed HE Grenades, though. It's either the timing not working with the radius search or me being bad at aiming :cookieMonster:
I'll look into these when I get home. I was considering reflecting projectiles based on their current velocity, but left the idea, and now I've forgotten why. Maybe it was because that as they are being reflected, they'll end up going faster and faster until it is impossible to send them back, but that seems like no concern, as the deflect speed could easily be capped relative to the muzzle velocity while still basing other reflections on the current velocity.