Replies: 1 comment 1 reply
-
hi. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm quite new to AS3 scripting (but have some minor experience with embedded C/C++/Bash/Assemble). One of the issue's I encounter, is how to get a debug log. I tried the following code, but it's rejected:
//package LOG
//{
// import { ExternalInterface.call } from 'flash.external.ExternalInterface';
// ExternalInterface.call = require( 'flash.external.ExternalInterface');
//}
And although my current script checks out with: node --check, it has bad interaction on the workings of the TSO client.
Is it true the user scripts are run, before opening the menu? And what can I do, to limit bad effects to the client due to bad coding?
Also, I'm trying to use the function GetRemainingConstructionDuration() from GO/cBuilding.as but I can't figure out how to normalize the output in percentage:
public function GetRemainingConstructionDuration():int
{
var _local_1:Number = 0;
switch (this.mBuildingMode)
{
case cBuilding.BUILDING_MODE_SET_BUILDING_GROUND_PLACE:
case cBuilding.BUILDING_MODE_SETTLER_WALKS_TO_BUILDING_GROUND_PLACE:
if (((!(this.GetResourceCreation() == null)) && (!(this.GetResourceCreation().GetPath() == null))))
{
_local_1 = (_local_1 + (((this.GetResourceCreation().GetPath().pathLenX10000 - this.GetResourceCreation().pathPos) / cComputeResourceCreation.SETTLER_WALK_SPEED_INT) / mGeneralInterface.mGlobalTimeScale));
};
case cBuilding.BUILDING_MODE_CONSTRUCTION:
if (this.GetGOContainer() != null)
{
_local_1 = (_local_1 + ((this.GetGOContainer().mConstructionDuration * 1000) * (1 - (this.mBuildingProgress / (100 * defines.BUILDING_PROGRESS_SCALE_FACTOR)))));
};
break;
};
return (int(_local_1));
}
Can you help me, with these question?
Cheers,
Emanuel (aka TL)
Beta Was this translation helpful? Give feedback.
All reactions