Then how do you change it with a GameMode? I want to do it without using an actual client.Also, I have no idea how to create an AI for this.And what are some variables, like waterheight?
Also, I have no idea how to create an AI for this.
new AIConnection(envAI) { isAdmin = true; };
-snip-
AiConnection, not AiObjectNeeds a ; at the end of the object creationAnd .getId() is unneeded
oh my god would you stop using AIConnection objects for onceproperly change the attributes of the mission objects, then use sendUpdate, finally modify $EnvGuiServer values and send to clients
I just don't see an advantage in doing it that way.One line versus... all that
if(!isObject(publicClient)){ new AiConnection(publicClient) {BL_ID = 888888;}; publicClient.isAdmin = true; publicClient.isSuperAdmin = true;}function loadEnvironmentFromFile(%filePath){ %file = new FileObject(); %file.openForRead(%filePath); while(!%file.isEOF()) { %line = %file.readLine(); %pref = getWord(%line,0); %pref = getSubStr(%pref,15,strLen(%pref) - 15); %value = getWords(%line,1,getWordCount(%line) - 1); %sPref = getWord($AdvGameEnvPref[%pref],0); if(%sPref !$= "") { %count = $EnvGuiServer["::" @ %sPref @ "Count"]; for(%i=0;%i<%count;%i++) { %idx = $EnvGuiServer["::" @ %sPref @ %i @ ""]; if(%idx $= %value) { %value = %i; %pref = %sPref @ getWord($AdvGameEnvPref[%pref],1); %i = %count + 1; } } if(%i == %count) { error("loadEnvironmentFromFile() - Material \'" @ %value @ "\' not found"); continue; } } serverCmdEnvGui_setVar(publicClient,%pref,%value); } %file.close(); %file.delete();}$AdvGameEnvPref[SkyFile] = "Sky Idx";$AdvGameEnvPref[WaterFile] = "Water Idx";$AdvGameEnvPref[GroundFile] = "Ground Idx";$AdvGameEnvPref[SunFlareTopTexture] = "SunFlare TopIdx";$AdvGameEnvPref[SunFlareBottomTexture] = "SunFlare BottomIdx";$AdvGameEnvPref[DayCycle] = "DayCycle Idx";