Closed andrewmcwatters closed 8 years ago
I think the API should include a queue system so people can stack up tasks. Unless I'm stupid and missed something.
character:addTask()
is like a task insert.
Excellent. Should each individual task have a "duration" argument so it can specify a "minimum" end time or does it just go through until "end" ?
It's delegated to the task handler, so you basically have to call next()
from your task to give up control. In the case of the moveTo()
task above, I just pass next
as a callback to character:moveTo()
, thus calling next()
when the player has arrived.
I think a system like this would allow us to interrupt tasks in the event you were attacked, or a quest needed to override your task queue, etc.
Yeah, good planning.
Pending downstream
merge to grid-sdk
from build 1141
.
This is pretty cool stuff. For @Planimeter contributors, you can preview the changes in vertex-adventure
upstream
in master
's latest commits.
Rough draft sample API: