PDA

View Full Version : Change Force-Status for SP-Maps


DukeSkywalker
07-02-2002, 09:02 PM
Ok...

I loaded the kejim_post map in my JK2Radiant to find some informations about scripts... i found the "target_scriptrunner" with the key Usescript and the valuue "kejim_post/kejim_start"...

After I unzipped this file, i wasn't be able to load this file with any program... i tried it with the simple Notepad and with "BehavEd.exe" of the Editing Tools 2... It didn't work...

How can I edit these scripts...??? There aren't any values for the force-status... I want to give my singleplayer-map(s) objectives and edit the force-status...

PLZ help if you can...

dvader28
07-02-2002, 11:02 PM
You have a choice...you can either download the second set of editing tools, and open the zip file (containing all the scripts used in the SP game in txt format), or you can download a program called dehaveb (search for it in google), which decompiles and displays IBI (script) files.

Hope that helps!

DukeSkywalker
07-02-2002, 11:13 PM
Originally posted by dvader28
...a program called dehaveb

Thank you for helping, but isn't "dehaveb" and BehavEd (EditingTools 2!!!) the same? I'm going to search for it...

DukeSkywalker
07-02-2002, 11:15 PM
Google found only this website:

http://www.photo-sport.ch/diverts/quark/jk2/scripts/introicarus.htm

I hate le Francais... ;)

jipe
07-03-2002, 01:45 AM
http://www.effiles.com/file.info?946

behaved is for editing the scripts

devaheb is for decompiling them - although all the scripts are in txt format in a zip file, in the second tools release (as dvader28 mentioned)

Derisor
07-03-2002, 02:22 AM
OK, this is how its done.

Create a new script file such as start.txt.

put the following in it.

//Generated by BehavEd

rem ( "startscript" );
print ( "Running start script xcxxxxccc" );

affect ( "kyle", /*@AFFECT_TYPE*/ FLUSH )
{
set ( /*@SET_TYPES*/ "SET_FORCE_JUMP_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_PUSH_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_PULL_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_SPEED_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_HEAL_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_GRIP_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_MINDTRICK_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_FORCE_LIGHTNING_LEVEL", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_SABER_THROW", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_SABER_DEFENSE", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_SABER_OFFENSE", /*@FORCE_LEVELS*/ "3" );
set ( /*@SET_TYPES*/ "SET_HEALTH", 100 );
}

Now save it in your base/scripts directory, preferably under a subdirectory for your map. Lets say we save it as base/scripts/mymap/start.txt. Close the editor. Then open BehavEd and open this script.

You will see each of the set commands in the right hand side window. Ok. So edit the force powers to your desire (double clikc on an item to change it) Hit compile and then exit BehavEd.

Now in your map create a "target_scriptrunner." Add the key targetname with a value of your choosing. Lets say we pick "startscripter". Then set the key "Usescript" and the value of where your script is. In our example we use "mymap/start". Also click on "runonactivator" so that it is selected. Note do NOT include the scripts directory or the file extension. Then select your info_player_start and add the key "target" with the value "startscripter".

Viola.

Gotchas:

Dont use CTRL-K to target things. I learned the hard way that if you have 2 entities selected with same keys but different values, selecting both will set the value of the other item. In this case spawnflags. In general NEVER EVER use ctrk-k to target entities.

Xcom
07-03-2002, 03:24 AM
Originally posted by Derisor
Also click on "runonactivator" so that it is selected.

That is not needed for current script.

Originally posted by Derisor
Dont use CTRL-K to target things. I learned the hard way that if you have 2 entities selected with same keys but different values, selecting both will set the value of the other item. In this case spawnflags. In general NEVER EVER use ctrk-k to target entities.

Dunno what kind of editor you using or HOW you using it, but that never happened to me and I almost always use Ctrl+K to connect stuff.

Derisor
07-03-2002, 04:53 AM
Using GTK. It cleared my spawn flags. Confused the hell out of me as I was having spawnflags beign set and wasnt doing it intentionally.

And .. what ? No kudos on the tutorial ? My first script even. =)