On page 24 of the ICARUS manual it says that an entity's behavior is determined by it's weapon. If you simply want a stormtrooper to fight like a jedi and use a saber write a script like this:
set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_SABER" );
In JK2Radiant add to your stormtrooper npc, key: spawnscript value: nameofscript
Another example: How to make a new reborn character with Tavion force powers.
Extract the NPC.cfg file form assets0 and put it in your gamedata folder. The file you extracted should be in a folder named ext_data. Go to the properties of the NPC.cfg file and uncheck read only. Open up the file and copy all of RebornBoss and paste it right bellow. Now rename RebornBoss to newreborn.
Do not rename the playermodel! Go to class and change it from reborn to tavion. Adjust his reactions, aim, evasion to 5. Increase his health to 350. Save it. Select your ext_data folder in your gamedata folder and make it a pk3 file. Create a new folder and name it NEW. Put your pk3 file inside of it. In Radiant put an NPC_spawner in your map. Add Key: NPC_type value: newreborn. If you were to just do the above your reborn would be standing there using his saber as a rifle. You need to put a saber in his hand for him to behave like a jedi. Add this to your NPC_spawner, key: spawnscript value: newreborn. Compile your map. Now for the script use this:
set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_SABER" );
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_GRIP_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" );
Save the script as newreborn and compile it. The reason we're increasing the force powers is because we're using Tavion's and she's not a Master yet.
Don't forget to select your mod at the startup screen. I'm still doing tests on this. Let me know how it works.
[This message has been edited by Mercenary (edited July 26, 2002).]
[This message has been edited by Mercenary (edited July 26, 2002).]
set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_SABER" );
In JK2Radiant add to your stormtrooper npc, key: spawnscript value: nameofscript
Another example: How to make a new reborn character with Tavion force powers.
Extract the NPC.cfg file form assets0 and put it in your gamedata folder. The file you extracted should be in a folder named ext_data. Go to the properties of the NPC.cfg file and uncheck read only. Open up the file and copy all of RebornBoss and paste it right bellow. Now rename RebornBoss to newreborn.
Do not rename the playermodel! Go to class and change it from reborn to tavion. Adjust his reactions, aim, evasion to 5. Increase his health to 350. Save it. Select your ext_data folder in your gamedata folder and make it a pk3 file. Create a new folder and name it NEW. Put your pk3 file inside of it. In Radiant put an NPC_spawner in your map. Add Key: NPC_type value: newreborn. If you were to just do the above your reborn would be standing there using his saber as a rifle. You need to put a saber in his hand for him to behave like a jedi. Add this to your NPC_spawner, key: spawnscript value: newreborn. Compile your map. Now for the script use this:
set ( /*@SET_TYPES*/ "SET_WEAPON", /*@WEAPON_NAMES*/ "WP_SABER" );
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_GRIP_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" );
Save the script as newreborn and compile it. The reason we're increasing the force powers is because we're using Tavion's and she's not a Master yet.
Don't forget to select your mod at the startup screen. I'm still doing tests on this. Let me know how it works.
[This message has been edited by Mercenary (edited July 26, 2002).]
[This message has been edited by Mercenary (edited July 26, 2002).]