Page 1 of 3

Grappling hook fix

Posted: Mon Dec 17, 2007 6:26 pm
by tsurugi13
I am new to the forums, and this is my first post ever, so I'll try not to break any rules. I am also new to modding, but I have a kamino based map I'll be releasing soon. Does anyone know how to fix the grappling hook? All I get is a couple flashes like a pistol firing. :oops:

Re: Grappling hook fix

Posted: Mon Dec 17, 2007 6:29 pm
by MandeRek
First of all; welcome.

Second; I don't think it can be fixed... A lot have tried it!

Third of all; don't know for sure if second is alright :P

Re: Grappling hook fix

Posted: Mon Dec 17, 2007 6:42 pm
by trainmaster611
Its not possible with the Battlefront 2 engine unfortunately (although it was for SWBF1....)

Re: Grappling hook fix

Posted: Mon Dec 17, 2007 7:14 pm
by [RDH]Zerted
trainmaster611 wrote:Its not possible with the Battlefront 2 engine unfortunately
Is that what one of the developers said or is that what GT members came up with?

Re: Grappling hook fix

Posted: Mon Dec 17, 2007 7:22 pm
by HobGoblin_264
It's probably possible, :cpu: but just isn't worth the effort for something as small as this. See this thread http://www.gametoast.com/forums/viewtop ... is+nothing for more information (remember not to bump though!)

Re: Grappling hook fix

Posted: Mon Dec 17, 2007 9:21 pm
by Teancum
The Grappling Hook is 100% can't-do-it impossible unfortunately. Psych0fred (an ex-developer that used to help out) looked at the source code to confirm that the function was broken in SWBF2.

Re: Grappling hook fix

Posted: Mon Dec 17, 2007 10:59 pm
by Commander_Cody771
How did it brake?

Re: Grappling hook fix

Posted: Tue Dec 18, 2007 12:19 am
by Teancum
Doesn't matter, we have no way to fix it, and Lucasarts/Pandemic would never release a patch for this old of a game.

Re: Grappling hook fix

Posted: Tue Dec 18, 2007 5:05 pm
by MandeRek
We couldn't do that... But still we can shoot a grapplehook away... That's just changing the effects/msh... Then you've got a grapple hook, which has actually the function of a normal gun...

Re: Grappling hook fix

Posted: Tue Dec 18, 2007 6:59 pm
by Teancum
There's literally no way to do it. The best modders have tried many, many times and there's no way getting around the fact that the actual code needed doesn't work.

Re: Grappling hook fix

Posted: Wed Dec 19, 2007 2:01 pm
by MandeRek
I know! I just tried to say you could make a normal gun shooting a msh which is a grapple and make some sort of effect which looks like a rope. Nevertheless, this would be the same as the rest of all pistols/rifle, it doesn't function as a grapple gun, but just as a gun. That's what I'm trying to say ;)

Re: Grappling hook fix

Posted: Wed Dec 19, 2007 2:28 pm
by tsurugi13
You could make one that has an exp effect of force pull. combine that with a rope msh and youve got an anti-infantry grappling hook! :yes:

Re: Grappling hook fix

Posted: Wed Dec 19, 2007 6:33 pm
by Master Fionwë
lol I tried it, didn't work. Although maybe it was just my setup in the odf file for the gun, but I intended it to be a weapon for my Arc Elite unit if it ever worked. :(

Re: Grappling hook fix

Posted: Wed Dec 19, 2007 7:41 pm
by Syth
Theres always a way to mimic it - Just make the pistol fire any ordinance, and them give the ordinance an explosion with a very very powerful negative push (like -40) and big push area. Then what ever you hit with the weapon you get propelled to. You could later add effects to the ordinance to make it look like a rope. (like what tsurugi13 said)

Bad thing about this is it pulls everyone towards the spot. I don't think theres a way to make an explosion only effect the owner, which spoils the idea.

Re: Grappling hook fix

Posted: Wed Dec 19, 2007 10:12 pm
by Teancum
Guys, it won't work. It's been tried. Over and over, by the best modders around, including the ex-developer that discovered the code needed from the executable was broken.

Re: Grappling hook fix

Posted: Thu Dec 20, 2007 4:01 pm
by Ace_Azzameen_5
Tean, did you read that last post, whats specifically wrong with what Syth said?

There may be some crazy thing involving deleting then respawning the character's unit, spawning an object that uses the same mesh as the unit class, then playing a ZE anim of that object and the grapple. But this would only work for grappling to and from a specific place at certain angles...

Actually, wait, it would be very possible if you could directly set an entity's "matrix" (coordinates of some type) via LUA, instead of just giving it the matrix you get from GetEntityMatrix(AnObject) or GetPathPoint.
Just do a little math on the matrix and use a millesecond timer for the combined effect being moving slightly in a certain direction each millisecond. Then spawn the effects. I believe the matrix provides the rotation, and possibly the yaw and pitch. These values would be used to determine direction of travel. Unfortunately, I haven't been able to dissect matrix 'variables' in LUA, probably because I'm a noob. Maybe its a table?

Has anyone been able to break LUA matrix variables down into a set of 6 or so numbers or something? (This would allow us to code some really cool stuff...)

Re: Grappling hook fix

Posted: Thu Dec 20, 2007 5:52 pm
by [RDH]Zerted
It says in the docs not to use lua timers for things like that. I don't expect you can get a workable millisecond timer from the script. You could always make a teleporting gun or marker (like those things in UT), but you wouldn't have the animation of traveling to that location or of the object traveling to you.

You should even be able to swap out the explosion of the recon droid and make it teleport you to its location instead.

The matrix does include info on the angles the entity is facing (as seen when you teleport a unit to a rotated fighter, that unit is also rotated). However, keep in mind that the result of GetEntityMatrix() doesn't have to be in a human readable format. It could always be some type of binary representation of some C++ object.

Re: Grappling hook fix

Posted: Thu Dec 20, 2007 9:24 pm
by ARC_Commander
You know, reading this actually gave me an idea. Is it possible for an explosion to emit an ordnance? If so, you could fire a super-crazy-high-velocity round out of the grapple gun, it explodes invisibly and emits a Force Pull with a very small cone angle - so small that it only affects the person who fired the grapple.

Re: Grappling hook fix

Posted: Thu Dec 20, 2007 11:48 pm
by trainmaster611
Arc, that might work. But as far as I know, its not possible with an explosion creating an ORD and all. Also the pull move makes the character go into a sort of toppling animation. Also, if the explosion did do that, I would pull in anything that is in front of it (not behind it), since that is the way pull is set up.

I'm going to work off of that idea.

Recently, me and rep of course made that deployable manned turret. When I was working on it, I realized that you could actually deploy an given object in game.

So what if we had the gun fire a dropturret as an ordnance (using a grappling hook model) with 0 gravity so it shoots straight. Then you set the dropturret aimer limits (presuming it has a hardpoint) so that it is locked in aiming towards the position that it was shot from -- where the player is standing. Then it would fire a friendly force pull ordnance with a narrow cone region pulling you to where it is, putting the unit in a prone animation so it looks like he is holding on as he flies, as opposed to toppling.

The chief difference here is that you are replacing the explosion with a dropturret that fires the ordnance backwards.

Re: Grappling hook fix

Posted: Fri Dec 21, 2007 1:34 am
by Syth
That'd work, but the ai turret/grappling hook would half to smart enough to shoot you immediately, and if you where standing next to anyone they'd get pulled too.