If you haven't read
part 1 and
part 2 of the scripting guide, then please read them
For these tutorials to work, you should use either FPSC
v1.19 or
v1.20 (recommended)
First off, flakscripts are basically what the name suggests, flak scripts. Ever since the camera functions that came with the v1.19 update, you can do some amazing things with flakscripts. Think of the effect when you snipe someone at long-range in Max Payne, that kind of effect, now before you drool, listen to this: That sniping effect can be done with ONE COMMAND. Sweet eh?
So, for the first part of this tutorial I will tell you how to get a flakscript up and running, and then we'll make a script for your flak. Before following this tutorial make a backup of your "gamecore\flak\modernday\law" folder, since we'll be modifying it, unless you wish to copy it and it's corresponding weapon to their own folders and edit the files to make a separate weapon.
Okay, open up your "gamecore\flak\modernday\law" folder located in your "Files" folder which is located in your FPSCreator directory.
64bit systems: C:\Program Files (x86)\The Game Creators\FPS Creator
32bit systems: C:\Program Files\The Game Creators\FPS Creator
if you have a 32bit system, then you will not have a "Program Files (x86)" folder, so that's just an easy way to find out what type of computer you have.
Now open that file called "flakspec.txt" and add this line to it:
script = flakscripts\sniper_effect.fpi
This defines what script this flak will use, if any script at all. Now we must create this script, open your scriptbank and make a new folder called "flakscripts"
Now open notepad and we'll begin scripting
The command we'll use is
EntityCam -- Attaches the camera to the object
So, after you have your usual script set up, you should have something like this:
;Artificial Intelligence Script
;Header
desc = Sniper Effect for Flak
;Triggers
:State=0:State=1,EntityCam
;End of Script
Save this as "sniper_effect.fpi" in the "flakscripts" folder you made. Now simply open FPSCreator and give your character the "law" weapon, and fire it, and voila, you will be amazed!
-TZK