Running a Check On Tasks

I have a situation where I want a function to run only if the Task Manager doesn’t have a specific task running (or in the task manager).

Is there a way to check if TaskMgr has or is running a specific task?

Since I haven’t come across a P3D function or method that serves as a remedy, I went ahead and used my own logic for this one.

I simply used a local variable (bool) as a checker. If the specific task I want to check for is running, the variable will be true, because the task set it true when it first started to run.

When that task stops or is removed, that variable changes to false. So now it’s just a matter of me checking to see if my variable is true or fase.

Works fine. :slight_smile:

panda3d.org/reference/devel/ … anager.php

findTasks
findTasksMatching
hasTask

guess those are pretty much what you wanted