"Manual" choking weapon

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

"Manual" choking weapon

Post by razac920 »

As I was working on new weapons for the zombies in my Zombie Infection mode, I discovered something cool. I wanted the zombies to be able to grab and choke the humans, so I modified Force Choke to grab and move units. I've never actually seen or heard of this being done (replacing the BF2 force choke with the force choke from Jedi Knight Outcast/JKA), but with scripting it's really quite simple to do! For whatever the name of your force choke weapon is, just add this to the lua script of the game mode you want it in:
Hidden/Spoiler:
[code]
newchoke = OnObjectDamage(function(object, damager)
if GetObjectLastHitWeaponClass(object) == "com_weap_inf_force_choke2" then
SetEntityMatrix(object, CreateMatrix(3.14159,0,1,0,0,0,2,GetEntityMatrix(GetCharacterUnit(damager))))
end
end)[/code]
What it does is just continually teleport the person being choked in front of you, and rotates them to face you too. If you want them closer or farther away, just replace "2" with the distance you want (must be closer than the range of the force choke weapon).

Actually what I found that was REALLY interesting (for me) was that if you set the distance to 0, the person being choked is so close to you that when they teleport to you (either you or they) get pushed back, letting the choker move much faster than normal, which reminded me of the Charger zombie units from Left 4 Dead 2.

Here's a video example showing both types of choking (http://www.youtube.com/watch?v=P4zEfsqzkSs)
Noobasaurus
Droid Pilot Assassin
Droid Pilot Assassin
Posts: 2006
Joined: Tue Aug 17, 2010 5:56 pm

Re: "Manual" choking weapon

Post by Noobasaurus »

WOW, that is really neat! Great find! :thumbs: Could this possibly be used as an AoE effect as well? I think if it were AoE it would be really overpowered but could have some interesting effects, like a bunch of stormtroopers choking around you.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: "Manual" choking weapon

Post by kinetosimpetus »

it can target more than one at a time, but it'd be more complicated to hold them all in different positions.

This is a very interesting thing, and I've, briefly, thought about it before but never tried anything because the choked unit can do nothing to escape, unlike in JKA.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: "Manual" choking weapon

Post by Maveritchell »

kinetosimpetus wrote:...the choked unit can do nothing to escape, unlike in JKA.
There's no reason you need to use the choke weapon as a base, provided you're not hung up on them using the choking animation. There's also no reason that you have to make a weapon that lasts indefinitely, either. The OP was just showing a proof-of-concept.
kinetosimpetus
Imperial Systems Expert
Imperial Systems Expert
Posts: 2381
Joined: Wed Mar 25, 2009 4:15 pm
Projects :: A secret project
Games I'm Playing :: Warframe STO

Re: "Manual" choking weapon

Post by kinetosimpetus »

Oh yeah, I suppose a regular emitter ordnance could be used. Wonder how it would look though.

I do have a question though, can the choker glitch the choked through walls and stuff?
razac920
2nd Lieutenant
2nd Lieutenant
Posts: 365
Joined: Sun Jan 16, 2011 12:42 am

Re: "Manual" choking weapon

Post by razac920 »

Yeah, like kinetosimpetus said, you could easily adjust it to target multiple units, but if you want to hold them not in one spot but in a ring around you, that would be considerably more complicated. It should be feasible, though. And yeah the person cannot escape if you are using force choke (though you run out of energy, someone attacks you or the person being held, etc., but other weapons could work and let the person retaliate... the key thing being that the held unit is continually being attacked by the holder. I'd guess something like force lightning would work too, where the person being held could still fire weapons at you, but can't move away from the lightning. Actually it would be very interesting to see if you could get the choke animation to play but still have weapons firing possible, in which case you could actually use force push to escape if you're a Jedi....

And yes, I just checked it and for large distances (5 or greater) it is possible for the choked person to be moved into/through a wall, though when you release them they may be pushed back out, to the edge of the wall, or they could stay in limbo and fall and die... which is a shame, since there is pretty much no way to check if the held unit is going through a wall. But at least for the distance shown in the video (2) this doesn't happen.
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: "Manual" choking weapon

Post by Maveritchell »

razac920 wrote:Actually it would be very interesting to see if you could get the choke animation to play but still have weapons firing possible, in which case you could actually use force push to escape if you're a Jedi....
The areaeffect weapon is the only one that supports forcing an animation bank on enemy players, and that property only works if you're completely stunning them (i.e. choke). It's a tradeoff - have the animation, or have the ability to attack back.

Honestly, you're best off just limiting the power to short uses anyway. Giving the player the ability to directly manipulate other players' position outside of the game's physics is pretty dangerous.
User avatar
TWINKEYRUNAWAY
Lieutenant General
Lieutenant General
Posts: 730
Joined: Fri Aug 17, 2012 3:13 pm
Projects :: Empire Rising
Games I'm Playing :: SWBF Doom FONV
xbox live or psn: No gamertag set
Location: 411Remnant
Contact:

Re: "Manual" choking weapon

Post by TWINKEYRUNAWAY »

That's really interesting! Could be a potential way to force grab someone and maybe with some more modifying throw them. Could be done in a balanced way with some more tinkering, even if you couldn't get it to throw anyone.
CressAlbane
Master Bounty Hunter
Master Bounty Hunter
Posts: 1519
Joined: Fri Dec 18, 2009 8:02 am
Projects :: CTF Arenas
Games I'm Playing :: Steam- cressalbane2
Location: ¿uoıʇɐɔoן ʎɯ sıɥʇ sı

Re: "Manual" choking weapon

Post by CressAlbane »

The unit's other weapon (The primary weapon if grab is a secondary) could be a limited "push" ordnance that has one effect it if hits within the "grab range," and a different effect / no effect after that.
Post Reply