How would I make a paralysis 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
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

How would I make a paralysis weapon?

Post by Anakin »

is there a way that an weapon causes paralysis for a defined time and amount.

So lets say i have a grenade and everybody affected becomes for 50 seconds 20% paralysis (he moves slower and shots slower).
User avatar
Kingpin
Jedi
Jedi
Posts: 1096
Joined: Fri Sep 13, 2013 7:09 pm
Projects :: The Sith Wars II
Location: Denver, CO
Contact:

Re: paralysis

Post by Kingpin »

Never seen that happen before. Maybe, you (on singleplayer only) use the LUA to somehow make the player work similar to a playercommand in Fake Console. Example, the "slow team blah blah blah" button makes the speeds of the characters slow. Maybe you could make the weapon cause an effect, and make them slow for such a large amount, they are virtually frozen. This is all theoretical, though.
User avatar
Nedarb7
Lieutenant General
Lieutenant General
Posts: 676
Joined: Sat Sep 22, 2012 3:41 pm

Re: paralysis

Post by Nedarb7 »

You could try...

Code: Select all

OnObjectDamage(
 function(object, damager)
 if GetObjectHealth(object) > 900000 then return end
 if GetObjectLastHitWeaponClass(object) == "THEWEAPONNAME" then
 UnitSpeedDec(object, 50)
 end 
end
 )
After ScriptPostLoad section:

Code: Select all

function UnitSpeedDec(object, timercount)
 SetProperty(object, "MaxSpeed", ENTERDISIREDVALUE)
 CreateTimer(untildef)
 SetTimerValue(untildef, timercount)
 StartTimer(untildef)
 OnTimerElapse(
 function(timer)
 SetProperty(object, "MaxSpeed", ENTERDEFAULTVALUE)
 end,
untildef
 )
 DestroyTimer(untildef)
end

I'm basing this of what I see in MasterSaitek009's Force Stasis... I'm not sure if it will work or not
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: paralysis

Post by Anakin »

would this be multi compatible??
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: paralysis

Post by THEWULFMAN »

Doubtful. Lua weapons rarely are.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: paralysis

Post by Anakin »

ok i'll may have a look at this later :)
Post Reply