Is it possible to ensure a group of Intervals is always resolved before another group of Intervals?
I try to explain my issue.
From different plug ins I’ve got Some Sequence/parallels that
groupe a) : modify value of object
groupe b) : render effects on object based on theses values
I would like to ensure that inside a frame, intervals from group a are resolved before intervals of group b.…(like a task priority but for interval)
I cannot easily make a Sequence of 2 Parallel (one including all group a intervals and one including all group b intervals) because intervals are created on demand and managed by objects that should never talk to each other directly…
Hmm, sorry–we don’t have a mechanism for sorting intervals. Sounds like you might need to migrate these to a task-based interface instead.
is there an efficiency issue hidden behind. I though that some standard interval are executed directly on C side … is it the same for task?
Else i was thinking about adding a optional priority argument in interval…
maybe with a setPriority method…
# Spawn task
taskName = self.getName() + '-play'
task = Task(self.__playTask)
task.interval = self
It is true that pure C intervals can be executed in C, not in Python. This includes most of the LerpHpr, LerpPos, etc. intervals. But certain intervals are written in Python and have to be executed in Python, like Func or LerpFuncIntervals.
Adding a priority to each interval would be a great extension to the interval system. It would have to involve changes to the interval manager, so that the interval manager would be able to sort its intervals into the correct order before executing them.
I never really found the intervals useful. Could you describe how much or what for exactly are they used in commercial games as toon town and pirates?
Heh, that’s kind of an open-ended question, isn’t it?
We use them all over the place. Just about anywhere you want to have a scripted action of a finite duration.
What does the
Drwr, I don’t think that adding a priority and sort function on ivals in the python IntervalManager is enough (it will impact only python intervals right?)
i have also to modify the CIntervalManager.step function to have it respect a kind of order?
i use interval nearly everywhere…character animation, cutscene,visual effects …
Right, you will have to modify the CIntervalManager. This is the actual brains behind the IntervalManager. In fact, there is only one IntervalManager object, and it uses code from both the CIntervalManager and from IntervalManager.py.