ok, so to cut straight to the chase; I have 3 scripts. Script A is just a list of variables, Script B is a modified FPS walker script, and script c is a variable altering script.
Script A’s variables are static so that Script C can access them to change its own variables
Script C’s Variables are static so script B can access them.
Problem: Script B IS accessing script C’s variables, but they stay the basic numbers I defined, which means C isn’t editting those variables. a snippet of C is to follow
static var normSpeed = 6.0;
static var sprintSpeed = 10.0;
static var aimSpeed = 2.0;
static var sprintDuration = 15;
static var gravity = 20;
static var penetrateVal = 1;
static var standardSpread = .4;
function Start () {}
function update () {}
function olympian() {
Trainer = gameObject.GetComponent("TrainMana");
if(Trainer.olympian < 2) {
sprintDuration = 45;
}
else if(Trainer.olympian < 3) {
normSpeed = 7.5;
sprintSpeed = 12.5;
aimSpeed = 2.5;
}
else if(Trainer.olympian < 4) {
normSpeed = 9.0;
sprintSpeed = 15.0;
aimSpeed = 3;
}
else if(Trainer.olympian < 5) {
normSpeed = 10.5;
sprintSpeed = 17.5;
aimSpeed = 3.5;
}
else if(Trainer.olympian > 5) {
normSpeed = 12.0;
sprintSpeed = 20.0;
aimSpeed = 5.0;
}
}