JavaGuy Posted August 22, 2002 Share Posted August 22, 2002 I can't for the life of me figure out how to get a script to run in game after I compile it. Link to comment Share on other sites More sharing options...
Blues Posted August 23, 2002 Share Posted August 23, 2002 exec "scriptname".cfg? Just make a script in notepad, save as whatever.cfg, then in-game open the console and type exec followed by whatever the name you gave it is. It needs to be in base for the game to be able to execute it, I think. Link to comment Share on other sites More sharing options...
Primesghost Posted August 23, 2002 Share Posted August 23, 2002 Wait a minute, what do you mean "compile"? Scripts are written in notepad and saved as .cfg files. Source Code is compiled. If you mean the source code. When you compile it with batch files it creates QVM (jk2mpgame.qvm, ui.qvm, jk2mpcgame.qvm) file and a .map file of the same title. In the GameData folder under the JK2 install path create a folder called Mod or MyMod. In this folder create a new folder called vm. Put the QVM and .map files inside the vm folder. Go back to GameData and you should see two .exe files: mpgame.exe and spgame.exe. Create a shortcut to mpgame.exe and under the properties add a space and the following to the target AFTER the last quote mark: +set fs_game MyMod (or Mod or whatever you called your mod folder) Now double click the shortcut and load the game, it should load up your compiled QVMs. Link to comment Share on other sites More sharing options...
idontlikegeorge Posted August 23, 2002 Share Posted August 23, 2002 you need to have a target_scriptrunner in your map, with a key/value Usescript/scriptname (no .ibi on the name) Link to comment Share on other sites More sharing options...
jipe Posted August 24, 2002 Share Posted August 24, 2002 idontlikegeorge is correct - for those of you who were lost, JavaGuy is referring to ICARUS scripts and not QVMs or CFG scripting. You can also use the "runscript" command from the console (ex: runscript path targetname) to test out scripts. Link to comment Share on other sites More sharing options...
Primesghost Posted August 24, 2002 Share Posted August 24, 2002 Ahhhhh, I see. Thanks for clearing that up. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.