Jump to content

Home

saber locking ending in a dismemberments


Markaine

Recommended Posts

Oh ,yeah...

What is the trick to get bots to always use a lightsaber?

I made a couple of bots with all different combinations of weapon weights, and they still only pull out a saber when you get really close to them, like the Tex_Qui Gon. I want them to behave like CT_Windu or MP_Vader. I even copy/pasted the exact weapon weights...

Link to comment
Share on other sites

Originally posted by Markaine

Is there a way to code mp saberlocking victories\loses to always or almost always to end in dimemberments like in sp.

 

I saw a line about

gGAvoidDismember = 1; and

gGAvoidDismember = 2

 

in g_active.c, is that what i should play with?

You're very close. You'll need to play with the following line (it's above the point where gGAvoidDismember = 1; in g_active.c

if (clientLost && clientLost->inuse && clientLost->client && Q_irand(0, 40) > clientLost->health)

The "Q_irand(0, 40) > clientLost->health" is what you're looking for.

 

Basically, Q_irand(0, 40) is a random number between 0 and 40 + zero. If the health of the losing player is less than the Q_irand(0, 40), the player dies and is dismembered. To increase the chances of dismemberment to 100%, just remove the "Q_irand(0, 40) > clientLost->health" part of the if statement.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...