Author Topic: Shot-warping target/Gravity Vortex  (Read 1021 times)

Shot-Warper:
Think about it. You throw one of these into the air, run a sizeable distance away, and call someone w/a rocketlauncher a noob. He fires, but the projectile is sucked towards the target and destroys it, saving your face.

Gravity Vortex (or a Black Hole Gun, Mayb)e:
Sorta like the portal gun. You shoot a portal onto the wall, and when that angry mob of zombies tries to rush you, BAM! They all fly towards the wall and are stuck, ready to be picked off one by one. Also works for players.
A black hole version would be the same, except once you hit it, you die.

tthat is a good ideal but it would take alot of scripting i  think

You can't change the course of a projectile once it is fired - the only way without engine changes is to create a new projectile about every 10ms for a smooth curve towards the Shot-Warper. Gravity only works downwards and is datablock-specific, so editing that won't work for individual projectiles.

As for the gravity vortex, physical zones can be used to stick stuff onto things, not entirely reliably though. They'd have a tendancy to kill everything if fall damage was on. If you were stuck to a wall you'd be able to strafe left and right to get out of it. If it pulled you into the ceiling, you could escape it with air control. You would need to put physical zones around it that kept pushing you into the main zone. However, projectiles, vehicles, people in vehicles, dropped items, and other similar things wouldn't be effected.

For the gravity vortex, you would probably want to limit it to being fired on bricks, to minimize the calculations on how to size the physical zone. I don't know if there is a function to get the normal of a face, but that is an easy way to figure out what direction it needs to move the player in. Physical zones have to be boxes, so you couldn't just rotate them to be perpendicular to the face they were fired at. If you wanted to do sloped walls, you would need to do some sort of calculation to decide which direction is has the least deviation from the normal of the face. I have no clue how you would handle a surface at a perfect 45 degree angle, maybe just tell the game to randomly pick between the two conflicting directions. The gravity vortex wouldn't be as effective on sloped surfaces because the game doesn't emulate friction, being pushed into a sloped wall results in a resultant force pushing you in the direction of the slope. In this case the 4 physical zones surrounding the main one would need to be more powerful to keep the moving player inside the main physical zone.

A black hole gun that sucks all the players into it might be easier to make, and equally as awesome.

You could use a radius search every so often and apply impulses towards it, using something like the Portal Gun code.


If you don't mind it, every 100 MS you could bend the path of the projectiles towards the point, although it would look less smooth, almost blocky, and I know that mods that go for smooth get spammed...


A periodic radius search would be simple and work well, so it would be the best option.

i actually saw something like this a long time ago

forgot where though