Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

gas room

Page: 1 of 1
 jinger
12-13-2005, 8:59 AM
#1
just wondering if someone had ever made a module with the classic computer console where you can gas a room with a couple of spikes. i had a look at a_comp_gas.nss …what the heck are all that globals for?

// Globals
int intGLOB_1 = 0;
int intGLOB_2 = 1;
int intGLOB_3 = 2;
int intGLOB_4 = 3;
int intGLOB_5 = 4;
int intGLOB_6 = 5;
int intGLOB_7 = 6;
int intGLOB_8 = 7;
int intGLOB_9 = 8;
int intGLOB_10 = 9;
int intGLOB_11 = 10;
int intGLOB_12 = 11;
int intGLOB_13 = 12;
int intGLOB_14 = 13;
int intGLOB_15 = 14;
int intGLOB_16 = 15;
int intGLOB_17 = 16;
int intGLOB_18 = 17;
int intGLOB_19 = 18;
int intGLOB_20 = 19;
int intGLOB_21 = 1100;
int intGLOB_22 = (-6);
int intGLOB_23 = (-5);
int intGLOB_24 = (-4);
int intGLOB_25 = (-2);
int intGLOB_26 = (-1);
int intGLOB_27 = 0;

// Prototypes
void sub1(string stringParam1, float floatParam2, int intParam3);
 Tupac Amaru
12-13-2005, 12:25 PM
#2
That thing confused me as well until stoffe explained it to me. The variables are from an include file, k_inc_utility in this case. The compiled scripts includes all the variable declarations from that file whether it uses them later on or not. The function sub1 is UT_GasRoom also found in k_inc_utility.
If you want to write your own script you don't need all those declarations. Just include k_inc_utility and use UT_GasRoom in the main() function like this:
#include "k_inc_utility"

void main() {
float fDelayGas = 1.5;
int int1;

DelayCommand(fDelayGas, UT_GasRoom("comp_gas_0", 10.0));
DelayCommand(fDelayGas, UT_GasRoom("comp_gas_1", 10.0));
ActionPauseConversation();
ActionWait(8.0);
ActionResumeConversation();
}
The source code for k_inc_utility can be found in scripts.bif along with comments what the different parameters do.
 jinger
12-13-2005, 6:20 PM
#3
lol >_< i should've guessed that
thanks Tupac Amaru
Page: 1 of 1