Jump to content
Sign in to follow this  
rundll.exe

Gravity gun

Recommended Posts

Hi, I was fiddling a bit with the scripting commands and after playing HalfLife 2 ep.2 A thought stroke my mind it would be funny to have a gravity gun in ArmA. So I made one.

grav.jpg

Well. its not finished yet but here is the progress and plan:

working:

-Possible to pick up an object where your gun is pointing by shooting at it.

-The object is "glued"to your gun until you fire it.

-A throw and drop mode, selectable as if you would toggle semi and auto fire. Throw will fire the object in the gun direction. Drop will just drop the object to the ground.

-Specify a list of objects classes that are allowed to pick up. There arent that many objects in arma that allow physics simulation. (all vehciles do but you dont really want to throw a tank)

-config of the "weapon", ammo and ammocrate

Todo

-Make the pickup more precise. Sometimes nearby objects you cant see are picked.

-Create a weapon model, now I just use the m16   confused_o.gif

-make the object be drawn to you instead of teleport.

Thats about it. I made some crappy movie that shows how it works:

(last part shows the arma physics arent that bad. tounge2.gif)

Ill keep you posted on the progress. (if there is any interest)

some questions remain:

1:Is it possible to add a fired eventhandler to a weapon? (didnt try yet)

2: Is it possible to find out trough a script if an object is able of physic simulation?

Share this post


Link to post
Share on other sites

Haha thats crazy. How long did that take to work out? tounge2.gif

I noticed the arma collision engine is some what better on slowish moving vehicles, and the object stays in the back of things like pickups.

Share this post


Link to post
Share on other sites

Cool. There was a gravity gun addon for OFP. If you can find it (on ofp.info probably) you might find the code useful.

Share this post


Link to post
Share on other sites
Heh nice ,if you want new model, you can port from HL2 Gravity gun original biggrin_o.gif

If I knew how I would whistle.gif

btw if I get it working nicely Ill try to get it work in MP, Its quite hard to kill inf with it, but maybe with some heavier (custom) objects it will be possible. (tossing a car at soldiers kills them wink_o.gif )

@maddmatt, thx I found it, lets see.

Share this post


Link to post
Share on other sites

actually picking up vehicles would be cool u should put it in maybe not a tank but cars anyway

Share this post


Link to post
Share on other sites

rofl.gif

In your face HL2, cant wait for this.

Share this post


Link to post
Share on other sites
Heh nice ,if you want new model, you can port from HL2 Gravity gun original biggrin_o.gif

would be illegal

Share this post


Link to post
Share on other sites

would be very funny if you could pick up helicopters imagine catching one in mid air and then firing it would be sweet

Share this post


Link to post
Share on other sites

Haha thats great, now I'll only need DOG and then I can play fetch the BMP for hours biggrin_o.gif

(frontpaged it on ArmedAssault.info)

Share this post


Link to post
Share on other sites

That looks sweet, gives me an idea for new MP game mode! capture the barrel tounge2.gif both sides have pick ups n must use the grav guns to capture oposing teams barrel.

Could be fun using this thing to make up barricades and bases out of junk too, over MP. That if u can get it working in MP at all.

Share this post


Link to post
Share on other sites

Really sweet! i loved the halflife2 story line so i cant wait to see this in ArmA. If you need any testers, just release the alpha into the site and ask for replies on what to fix. Great work notworthy.gif

Share this post


Link to post
Share on other sites

Me thinks a sandbox mod coming soon, like the one in BF2.

I wonder if you could pick up soldiers with the grav gun, possible?

Share this post


Link to post
Share on other sites

seems like this could have more practical applications. Maybe being able to move around road cones, etc. Or transporting an ammo box.

Share this post


Link to post
Share on other sites
seems like this could have more practical applications. Maybe being able to move around road cones, etc. Or transporting an ammo box.

Yes, that was what i was thinking too, I might release a script-only thing that allows you to pick up and drop objects and maybe throw them with a small speed, depending on the size. After Im done with this.

@all

Thx for the positive feedback, im back to work now smile_o.gif

to clarify: you can pick up everything that is placed in the editor (so no island objects confused_o.gif ) but I restricted the classes to make it at least a bit realistic, but you can specify this as user quite easy. So even men and choppers. I just tried tossing a manned camel in the air, and AI gets totally confused biggrin_o.gif But it will fly like you throw a paper plane.

Its also great fun to throw objects to low flying choppers rofl.gif

the biggest problem atm is the objects get damaged when you hold them. Im not sure what causes this but ill find a solution.

Share this post


Link to post
Share on other sites

this would be great for building up a defensive position. can you save at all it would be really usefull if you could.

Share this post


Link to post
Share on other sites

I used to love making barricades in Doom RoE with the grabber, just to protect the NPCs I had to leave behind (and cause it's mindless fun).

It'll be interesting to see how this goes!

Share this post


Link to post
Share on other sites

Portal gun should work like tha same like stargate xmas_o.gif . I dont think that portal with things visible trough could work.

Share this post


Link to post
Share on other sites

In editor would be nice. But what if you place things like static objects (machineguns...) on some height (houses, roofs)? Usually they fall off or go down through buildings. Maybe you can add setpos to the script.

Transporting standard ammo boxes should be only done by two soldiers. I'am afraid ai cant get this.

On the other hand addon maker who create forklift, crane etc. could be using your script somehow.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×