Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / The FPSCreator Scripting Guide Part 3: Flakscripts - What Are They and How Do You Use Them?

Author
Message
The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 2nd Jul 2012 04:39 Edited at: 2nd Jul 2012 04:47
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:



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

SecretiveOps
14
Years of Service
User Offline
Joined: 13th Sep 2010
Location:
Posted: 4th Jul 2012 21:26
Um... bit of a problem, my missile goes completely down and stops in it's tracks. And another question... how do I speed flak up and give it gradual drop? I've got a splendid idea for a tracer round.

Why does life suck the life out of you?
The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 5th Jul 2012 04:16
@SecretiveOps
Quote: "Um... bit of a problem, my missile goes completely down and stops in it's tracks."


Yeah, this seems to be an FPSC bug, it really annoys me.

Quote: "how do I speed flak up and give it gradual drop? I've got a splendid idea for a tracer round."


Hm, this I'm not quite sure of. I guess you could use variables and gradually raise the variable by using timers and set the speed to that, as for falling, I think FPSC already seems to do that :p



-TZK

Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 5th Jul 2012 10:58
Do you know if all commands works in the flakscript? Or is it only a selected few?

Would be cool to add some sort of AI to the flak, so we can have homing missiles etc

The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 5th Jul 2012 11:55
@Cyborg ART
All commands should work, because when (judging by the code) flak is using a script, it is completely converted into a regular entity. I'm not sure about AI though, since you can only give the flak a main script, but I'm very sure there's a workaround.

-TZK

Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 5th Jul 2012 15:01
I will take a look.
Maybe it would be possible to get some sort of javelin to work. Even if it wont have a top-down tajectory it would still be cool to at least have it following the tank or whatever you may shoot at.

maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 5th Jul 2012 15:52 Edited at: 5th Jul 2012 15:56
up to v119 flaks definitely cant use decals, maybe now in v119.

for speed and parabola-fly you have to edit the first 3-4 lines in the flakscript. here you can change from missile-style to grenadethrow, look at the 2 flakscripts bazooka and grenade to get some samples. the drop ingame comes from the fact that the enemy fires on the virtual player-pivot on 0,0,0 so firing into the ground in front of you. i can give you the variation for a straight flight (in your face!^^) tomorrow if you wish (wrong machine atm), wich works for minimum of 12 squares tested.

and yes, of course you can do a javelin when you can do a grenade. (mmh, i thought the dragon on fps-files was by yourself, cyborg, but has to be build by another one)

Cyborg ART
17
Years of Service
User Offline
Joined: 14th Jan 2007
Location: Sweden - Sthlm
Posted: 5th Jul 2012 17:34
Quote: "(in your face!^^) "


...




Haha!

I know that its possible to have a drop etc. but the tricky part would be to have the missile following the target. If a tank would move then it should follow. Same for distance, it would need to calculate the distance to the target so it hits right on top, not 20 meters behind.

So the weapon would need to "speak" with the flak.

Or maybe you have a super and cleaver idea. Then I would gladly put together a Javelin weapon

Quote: " (mmh, i thought the dragon on fps-files was by yourself, cyborg, but has to be build by another one)"


Nope, havent made any dragons. Maybe Rolfy?

maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 5th Jul 2012 18:47 Edited at: 6th Jul 2012 15:30
maybe, oh and sorry, when i hear javelin i think of an antique spear. really.

^^
ok, workaround for MISSILES, thank you. i know you can "enter" a vehicle and drive it (with a hud in the chopper of the store), especially now with entitycam-command with v119. it is possible to create a javelin rocket that you can direct into a target, using distance check to destroy both when near. but that would not exactly be a javelin-MISSILE.

an autonomic weapon should be possible, using a combination of samefloor/settargetname/moveto etc., but only in special build levelmaps and only on specified targets i think. would be good for a flat bosslevel. if its not possible with flakscript, you now can "fake" flak-weapons of all kinds with binding clonable entities to the player and use scripts to control their behavior.

but all theory, i havent tested anything of this, so just some thoughts, born out of the thing of illuminate-/shadable flaks... wich still isnt possible atm i think. ... except with bound playerobjects.

The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 6th Jul 2012 14:24
Quote: "i can give you the variation for a straight flight (in your face!^^) tomorrow if you wish (wrong machine atm), wich works for minimum of 12 squares tested."


Yes please! :p

-TZK

Login to post a reply

Server time is: 2024-11-23 21:27:32
Your offset time is: 2024-11-23 21:27:32