passing args to tasks

Do it like this:

task = Task(self.float_dmg)
taskMgr.add(task, extraArgs = [task, damage])

Two points:
(1) You don’t pass self.float_dmg(task, damage) to the Task constructor. Doing that calls self.float_dmg on the spot, and (if the function were to return without error) would just pass the return value of that call into the Task constructor. Instead, you want to pass the function itself to the Task constructor, which means just the function name, no parentheses. The Task will store the function pointer and call it later.
(2) The first argument is task, not self. Remember, self is your World object. So if you pass self as the first argument to your float_dmg function, then your World object takes the place of the first parameter, which you have called “task” in your float_dmg function–confusing you, because it is not the Task, it is a World object. So when you then reference task.time, you’re really referencing World.time, which doesn’t exist.

The reason you create the Task object independently is so you have a task object to pass as the first argument.

David