Jump to content

Gravity gun


fireman3521

Recommended Posts

 

For those who dont know, the gun pull targeted item to and throw it back. Simple. It's like the Rock-it laucher but funnier because it would work with anything and you dont need to have items in your inventory. Also, beeing able to throw corpse would be cool too.

 

The gravity gun would be like when you grab a corpse, but with longer range and stronger power. Would it be too hard to do ?

Im pretty sure that if someone do this, he will get a pretty high score ;)

Link to comment
Share on other sites

Hmm, you can forget about the corpse thing. Fallout Physics make corpses behave very oddly when you move them. The most likely scenario is the corpse going on a stretchy berzerk bounce all over the screen until the physics engine gets a fit and the game crashes.

 

Items.. eeh... it's not "easy like the rockit launcher" due to the way it works.

There's 2 issues to handle: 1 pulling the item, 2 shooting the item.

 

1) Pulling the item is not trivial, it involves changing the item's coordinates every frame.. manually. And to do it in a believable way that doesn't look like crap, it involves coding physics into the moving equation.

 

Luckily for you, i already did that piece of code for a mod of mine.

 

 

2) Shooting the item is another problem. It can't be shot "like with the rockit launcher". while you could add items to a rockit-launcher-like weapon's ammo list on the fly through fose, there's no way to access it's "shooting queue", that is, the list from where it's eating the items to fire. You see, the weapon itself was made uglily, pretty much half of it is hardcoded.

What does all that mean?

That to do it, you'd need to move the "projectile".. manually. Not easy, not pretty, worse if you want the projectile to have some sort of firing arc.

 

Problems? there's no way to detect walls, or floor, or obstacles, so the item would fly through them. It's processor-intensive, and since there's no way to know where's the player's firing node, the item would be shot from a rough estimate, which will look rather weird.

Link to comment
Share on other sites

TGBlank : Thanks for your reply. you said you made the code for pulling an object. Would it be possible to take the rock-it laucher and add the pulling thing to it ?

 

Also, i dont get why there's no way to detect wall, It works with the Rock-it Laucher.

Sorry if it looks stupid but i just dont get it. Im not very good at coding :confused:

Link to comment
Share on other sites

The rock-it launcher is hard-coded to create a projectile with the object's mesh, on the fly. Shoot it with pre-defined physics using the physics engine, and then turn it back to the original object once it impacts.

 

Again, that behavior is HARDCODED and not accessible for modders to use.

 

The closest thing possible is MANUALLY moving the object, that is, throw the physics engine through the window and assign the object's x, y and z coordinates every frame to move the object, this haves several downsides, one of them being unable to detect collisions, meaning, can't detect walls, furniture, or clutter, and the best you can do to detect actors is creating invisible explosions every frame, like a blind man bashing stuff on range with a stick to see if he bumps an actor.

 

 

As for giving the rock-it launcher the pull, did you even friggin read my post?. You. Cannot. Add. Stuff. To. The. Rock-It. Launcher. Ammo. Box. Through. Script.

Best you can do is add it to the player. Was that clear enough?.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...