*..fades in..*
Pilot, you obviously don't know what you're doing. You just gave him some flawed code for a hotkey to change his saber reflection accuracy. Now is that what Hbbtstar asked for?
Star, saber-blocking is mostly controlled by the exe. But, there are three template settings that you can use to change how the saber blocks:
error: controls the accuracy of the reflected bolt. An error of 0 will make the bolt inevitably hit the creature that fired it.
chance: a 0 to 1 value that controls the chance of kyle to reflect the bolt.
fov: stands for "field of view," but it's deceptive. It's really the minimum dot product of the direction the player is looking and the direction that the laser is coming at him. But you can think of it as a -1 to 1 scale with -1 reflecting all bolts and 1 reflecting none.
Each level gob contains a .jkl for all the levels it contains. These JKL files are text files which you can open with Wordpad. There's a section near the bottom of each JKL called "Templates." A template near the top of the list called "walkplayer" contains the information that JK needs to create Kyle ingame. In this template, the three template values for saber-blocking are defined.
The cog verb, ParseArg(), is used to modify template settings ingame when given an object that was created from the template. So, you would rewrite the FP cog and use ParseArg() commands to change the template settings while the force power is on. When the power should turn off, use ParseArg() again to give the player back his original settings.
Now, you can't make a good patch without knowing Cog, and you should write this cog yourself. If you're new to Cog, download the utilities listed in my signature (basic tutorials are included in the DataMaster). If you need help with the making of your cog or if I didn't make much sense, post again.
Glad to help.
------------------
Author of the
JK DataMaster,
Parsec, and the
EditPlus Cog Files.
Visit
Saber's Domain.
[This message has been edited by SaberMaster (edited June 05, 2002).]