Jump to content

Home

force lightning modding question


Markaine

Recommended Posts

Originally posted by Markaine

how could I code it to allow me to break this attack while on the ground? Or would I have to edit the "on the ground animation" to allow me to do something?

The way I have it set up so far is, when you're hit by lightning, you can't get up or do anything unit they let you go.(Luke in ROTJ couldn't do shet.....heh)

 

Don't know how... don't know what you want...

 

-You want to be able to push your victim away ?

-You want to be able to... what ?

Link to comment
Share on other sites

  • Replies 61
  • Created
  • Last Reply

Sorry, i misread the post :)

I don't believe any animation restricts viewing angles, so absorb, push and pull should all be viable counterattacks from the knockdown position.

You could also add a chance to break it by just jumping. You could give a % chance to break it with each jump attempt, proportional to their force jump level (this would also give gunners a way to break it too).

Link to comment
Share on other sites

This is what i got going:

 

if ( traceEnt->client )

{

vec3_t pushdir;

VectorSubtract( traceEnt->client->ps.origin, self->client->ps.origin, pushdir );

 

traceEnt->client->ps.forceHandExtend = HANDEXTEND_KNOCKDOWN;

traceEnt->client->ps.forceHandExtendTime = level.time + 1000;

traceEnt->client->ps.forceDodgeAnim = 0;

traceEnt->client->ps.quickerGetup = qfalse;

 

traceEnt->client->ps.velocity[0] = 20

}

 

The target can't get up or use anything until the attacker stops lightning.

 

I'm starting to think(traceEnt->client->ps.velocity[0] = *20* has something to do with it.

Link to comment
Share on other sites

if that's inside the forceLightning loop, they wouldn't have a chance to get up unless you also checked for some sort of saving throw, like:

 

...

if ( traceEnt->client && !traceEnt->client->savingThrow)

{

...

 

...where savingThrow was an int that was toggled based on whether they'd tried to jump/hit the push button X times/convinced their cyborg-sith-apprentice-for-a-dad to toss the attacker over the edge/etc...

 

i think HANDEXTEND_KNOCKDOWN is what prevents them from using force powers, so if you hacked another means of getting a knockdown animation, that might solve it too.

Link to comment
Share on other sites

Why did you quit using the pushdir as the push direction? Your current code just pushes the player in the x direction. That doesn't make any sense especially since you're still doing the pushdir calculations.

 

As for the use of force powers, you can only use the push/pull when....

1. forceHandExtend is not being used OR

2. HANDEXTEND_KNOCKDOWN is being used AND You're in the middle of getting up from the knockdown.

 

Your current code will continuely update the HANDEXTEND_KNOCKDOWN, refresh the forceHandExtendTime, and push the player on the x axis until you quit lightning the guy. I don't think that's what you want.

 

What mod are you working on anyway?

Link to comment
Share on other sites

Originally posted by Darth_Syrup

....AJL - i implemented lightning blocking too. :)

 

Oh... how does it work in your mod ?? (mod = forcemod ?)

 

If yes then where can i download it... ? (jediknightii.net

doesn't work...)

Link to comment
Share on other sites

Originally posted by Markaine

how do I edit that lightning damage int? Or would it be easier to edit the electrifytime. I want the lightning weaker. Much weaker.

 

void ForceLightningDamage

 

G_Damage( traceEnt, self, self, dir, impactPoint, dmg, 0, MOD_FORCE_DARK );

 

Change that... example:

 

G_Damage( traceEnt, self, self, dir, impactPoint, (dmg * self->client->ps.fd.forcePowerLevel[FP_LIGHTNING] * 0.2), 0, MOD_FORCE_DARK );

Link to comment
Share on other sites

Thanx, that did it. Now I have two more problems...

 

I need to edit force pull and pull. The resistance, I need to lower the probability of blocking them. And have a stronger push.

 

Then I need to figure out a force "glide" effect when falling. like after releasing the button, press it again to to slow down your fall. Yes, like Kain or Raziel. It also has to cost alot.

 

Any Ideas?

Link to comment
Share on other sites

AJL: well, i'm still tweaking it, but hopefully it'll be faithful in appearance to the obi-wan vs dooku block in Ep2. the version with this feature ain't out yet.

 

Markaine: look in the forceThrow function - it checks for blocking and regulates intensity.

Link to comment
Share on other sites

Originally posted by Darth_Syrup

AJL: well, i'm still tweaking it, but hopefully it'll be faithful in appearance to the obi-wan vs dooku block in Ep2. the version with this feature ain't out yet.

 

Soo.. blocking with lightsaber... (did you and if you

did somehow turn that lightning into defenders saber

when he is blocking... then how ??)

Link to comment
Share on other sites

Originally posted by Darth_Syrup

AJL:

Markaine: look in the forceThrow function - it checks for blocking and regulates intensity.

 

What about the pull\push blocking? Is that there too?

 

What do you guys think about gliding? Too much coding? Or the fear of too many people floating around after the jetpack runs out of fuel? (if a jetpack mod is compatible that is)

Link to comment
Share on other sites

Originally posted by Markaine

What about the pull\push blocking? Is that there too?

 

What do you guys think about gliding? Too much coding? Or the fear of too many people floating around after the jetpack runs out of fuel? (if a jetpack mod is compatible that is)

 

Forcethrow = PUSH and PULL (and yes code is in there)

 

Search for: qboolean CanCounterThrow

 

Most of push/pull blocking requirements are there but there

are some blocking stuff also in that actual push/pull code...

I mean in that "Void ForceThrow"

Link to comment
Share on other sites

int powerDif = (modPowerLevel - otherPushPower);

 

if (powerDif >= 3)

 

pushPowerMod -= pushPowerMod*0.2;

if (powerDif == 2)

 

pushPowerMod -= pushPowerMod*0.4;

if (powerDif == 1)

 

pushPowerMod -= pushPowerMod*0.8;

if (pushPowerMod < 0)

 

pushPowerMod = 0;

 

 

Is this what I need to edit to decrease the resistance of push/pull? Or is it that "int randfact = 0;..........."

code?

Link to comment
Share on other sites

Originally posted by Markaine

int powerDif = (modPowerLevel - otherPushPower);

 

if (powerDif >= 3)...................

 

This stuff:

 

qboolean CanCounterThrow(gentity_t *self, qboolean pull)

{

int powerUse = 0;

 

if (self->client->ps.forceHandExtend != HANDEXTEND_NONE)

{ //can't counter if i am using some force or...

return 0;

}

if (self->client->ps.weaponTime > 0)

{ //can't counter if i am attacking...

return 0;

}

if ( self->health <= 0 )

{ //can't counter if i am dead...

return 0;

}

if ( self->client->ps.powerups[PW_DISINT_4] > level.time )

{ //can't counter if can't do anything...

return 0;

}

 

if (pull)

{ //pull against pull...

powerUse = FP_PULL;

}

else

{ //push agains push...

powerUse = FP_PUSH;

}

 

if ( !WP_ForcePowerUsable( self, powerUse ) )

{ //can't counter if you don't have push/pull power...

return 0;

}

if (self->client->ps.groundEntityNum == ENTITYNUM_NONE)

{ //can't counter if you're in the air...

return 0;

}

return 1;

}

 

 

Inside of: void ForceThrow( gentity_t *self, qboolean pull )

 

if (otherGuysPushPower && CanCounterThrow(push_list[x], pull))

{

if ( pull )

{

G_Sound( push_list....

push_list[x]->clie...

push_list[x]->clie.....

}

else

{

G_Sound( push_list...

push_list[x]->clie......

push_list[x]->clie....

}

push_list[x]->client->ps.powerups[PW_DISINT_4] = push_list[x]->client->ps.forceHandExtendTime + 200;

 

if (otherGuysPushPower >= pushPower)

{

pushPower = 0;

canPullWeapon = qfalse;

}

else

{

pushPower -= otherGuysPushPower;

}

}

 

 

 

 

 

============================================

 

OK its available now (again)...

 

Newest version of SFX2 ( Uploaded: 3.2.2003 ):

http://alienjl.homestead.com/files/SFX2Installer.zip

(If you have older version... Delete it)

 

If you have comments send email:) or post here:

http://66.227.96.58/showthread.php?s=&threadid=89268

 

============================================

Link to comment
Share on other sites

perhaps change this:

 

VectorSubtract( traceEnt->client->ps.origin, self->client->ps.origin, pushdir );

VectorCopy( pushdir, pushdir2 );

VectorMA( self->client->ps.origin, 500, pushdir2, range );

 

to this?:

 

VectorSubtract( traceEnt->client->ps.origin, self->client->ps.origin, pushdir );

VectorNormalize(pushdir);

VectorMA( self->client->ps.velocity, 500, pushdir, self->client->ps.velocity);

 

That's if i remember the vector functions correctly.

Link to comment
Share on other sites

Archived

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


×
×
  • Create New...