Page 2 of 2

Re: Chart Screens

Posted: Wed Nov 22, 2023 10:05 am
by Killer Wolf
made a little bit of progress - kinda
when i amended the code to

Code: Select all

//this.shipWillLaunchFromStation = function() 
this.shipWillExitWitchspace = function() 
{ 
	system.addShipsToRoute(this.role, 1, 0.7, "ws");
    //system.legacy_addSystemShips(this.role, this.count, 1.0); 
    log("testscript.spawn", "Generated " + this.count + " " + this.role + " for testing purposes." + this.kwgal + this.kwsys); 
	//log("gal" + this.kwgal + " planet " + this.kwsys);
	
}  
i got a spawn and the message w/ "07" at the end ~ problem is, i launched from Tionisla and jumped into Zaonce [129] so i dunno why i got a 7 [Lave] for the sys number? coincidence that it's the same numbers as in my positioning calc??

edit - meh, it's printing the same no matter where i jump to, so i guess my
this.kwgal = galaxyNumber;
this.kwsys = system.ID;

isn't right?

Re: Chart Screens

Posted: Wed Nov 22, 2023 10:43 am
by phkb
If you have this.kwsys = system.ID at the top of your script, it kind of makes sense that it would get set to 7, because I think the default starting point for the game is Lave, even if you load in a save game. So when your script is setup up, your variable is set to 7, and unless you change it elsewhere, will stay as 7.

Re: Chart Screens

Posted: Wed Nov 22, 2023 1:11 pm
by Killer Wolf
oh :-/
i nicked it from the pulsar script, where it checks to see if the value is 246 for Tianve. i thought it represented the galaxy/system of the player's location.