Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Saber Blocking...
Saber Blocking...
2005-01-28, 9:05 PM #1
Does anyone know what code would increase saber blocking ability...? I'm major stumped: If I give NPC a 1.00 accuracy value, the Jedi blocks EVERY shot; if accuracy drops below 1.00, the Jedi is hit by less accurate blasts... kinda unnerving...

_K_
2005-01-28, 9:55 PM #2
Hmm, have you tried using flex numbers of very minute ammounts close to 1.0?

Like: 0.999999?
-Hell Raiser
2005-01-28, 11:52 PM #3
Nope... I want the Jedi to block the less accurate shots, actually.

Thanx, tho -- good input for future x-periments...!

_K_
2005-01-29, 1:47 AM #4
Somebody around here worked up some code for the player saber, to be able to block almost all shots from the front, but none from the back. It involved "taking over" the coding for saber blocking by mimicking it. I think it was done by 0'ing out the damage taken, and firing a projectile at a random angle from the blocker, and playing the blocking animation.

*sigh* Now that I think about it, I could probably write up the code for this, to be able to adjust blocking accuracy and all that jazz (for player and AIs) but I just don't have the time. :(
-Hell Raiser
2005-01-29, 7:03 AM #5
There are 3 values that pertain to saber blocking defined in the jkl for the player/actors template.

error: defines the accuracy at which deflected projectiles are fired back at their source. Kyle uses 0.5, I believe 1.0 is 100% accuracy.

fov: This defines the angle width/fov at which the actor is capable of blocking a projectile. This is the one I think you're looking for. I'm not totally sure what format this is in, I think it might be the cosine of the angle. I believe 1.0 is 180 degrees. negative values give you greater than 180 degrees, values less than 1.0 give you less than 180 degree blocking.

chance: This defines the likelyhood an attack will be blocked, I don't think LEC ever set this to anything besides 1.0 which is 100%...but I've set it to less and it produces the expected results (0.8 reflects 80% of shots)

RBots uses a rewritten saber blocking system.
-El Scorcho

"Its dodgeball time!" -Stormy Waters
2005-01-29, 7:15 AM #6
*sigh* More useful info contained to one editor. :p

(Unless there's an updated template reference...)
-Hell Raiser
2005-01-29, 10:15 AM #7
WoW...! Thanx for all the info...!

_K_
2005-01-29, 10:40 AM #8
Oooof-- having trouble locating player/actor template... could you point me in the right direction, please...?

THANX!

_K_
2005-01-29, 11:17 AM #9
Is this for a mod or a level? For levels, use the template creator in JED...or directly edit the .tpl file in your project director.

For a mod, well changing the walkplayer thing should be done using parsearg() other things could be done through static.jkl
-El Scorcho

"Its dodgeball time!" -Stormy Waters
2005-01-29, 1:55 PM #10
For a mod -- Opened up the master.tpl and sure enough: the "walkplayer" is the template I needed.

You guys ROCK -- thanx a million... no, thanx a BILLION...!!!

_K_

↑ Up to the top!