Jump to content

Extract time remaining of DoTaskInTime function


Recommended Posts

usually the code to start a task is:
inst.task = inst:DoTaskInTime(...)
and then you can use this "inst.task" to get information or cancel the task.
If you are unlucky you want to cancel/ask info of a task that was started by the devs and they did not save the task anywhere, in this case I dont know a way, it may be impossible...
Looking into entityscript DoTaskInTime you see that something is saved within self.pendingtasks, maybe you can access this and try to find the relevant task.

Edited by Serpens
Link to comment
Share on other sites

On 17.10.2019 at 5:39 PM, Serpens said:

usually the code to start a task is:
inst.task = inst:DoTaskInTime(...)
and then you can use this "inst.task" to get information or cancel the task.
If you are unlucky you want to cancel/ask info of a task that was started by the devs and they did not save the task anywhere, in this case I dont know a way, it may be impossible...
Looking into entityscript DoTaskInTime you see that something is saved within self.pendingtasks, maybe you can access this and try to find the relevant task.

Okay so I searched a little bit more and i have found that even tho "EntityScript:TimeRemainingInTask" is in the code, only "GetTaskRemaining" function is used in most files. Which solves my issue

Edited by Parusoid
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...