- Quick Links - |
Visitor No.72282 |
- Random Picture - | ||||||
|
Giving Enemies Secondary Fire Modes
In this tutorial we are going to give repeater shot as secondary fire for a standard Reeyee to show how to give a new secondary fire to an enemy.
As usual, place those files where they belong to. Put original actor_rb.cog, rydefault.ai0, rydefault.ai and rydefault.ai2 in appropriate folders.
Now through cog, give the actor the secondary fire with ParseArg verb to edit its template dynamically. Open actor_rb.cog with a text editor. Add this, so it sets the secondary fire mode in the template. created: SetThingPulse(GetSenderRef(), 1); //This will keep giving the actor the secondary fire mode. return; # ........................................................................................ pulse: ParseArg(GetSenderRef(), "weapon2=+repeaterball"); //This will change the actor's template through cog. return;
The ai file will tell to fire secondary fire by placed percentage. The default is 0, so you must need to change it to some other value. Next, open up all the ai files extracted. ai0 for easy mode, ai for medium mode and ai2 is for hard mode use. You only need the ai for the difficulty mode you play. The 8th parameter in the PrimaryFire instinct is the percentage of the use of the secondary fire mode. 1 = 100%, 0 = 0%. You can set your own difficulties with the percentages.
This is it for the edit. Last notes : 1. The reason to pulse is that the effect will be cancelled once the player dies and reloads. 2. This can be done using the static.jkl and add the weapon2 parameter but in that way the game will always crash upon loading saved games. 3. As you will see, it only affects brown Reeyee with stormtrooper rifle. In order to give others the same effect, you must find out which ai and cog the character is using and take the same procedure. 4. If this modification is within one of your own edited levels, edit the enemy template in the level jkl and it will have no problem. No crash. 5. To make it perfect, editing snd and pup will give sound and movement for the secondary fire.
Launch Jedi Knight and load level 1. If the level doesn't include the secondary weapon template, you must manually add it in the static.jkl.
|
This site is developed using PHP under Apache server Certain parts of this site require Cookie support. This site is best viewed with
Internet Explorer 5.5, Netscape 6.0, Opera 6.0 or Mozilla 1.0 and above |