On Thu, 30 Oct 1997, Grassel Guido NRC/Hki wrote:
> We have a problem if object 2 gets deactivated before object 3 gets
> activated or vica versa because the token position in the TG is always
> increased but never decreased. But the idea with the token position is
> good.
Right, it is just a quick hack.
To keep track of the activation and deactivation of the objects you just have
to add two Links and another row of ActionSlots. Here is the new solution:
{:Bitmap
1
...
}
{:Audio
2
...
}
{:Bitmap // Dummy for TokenGroup
3
...
}
{:Bitmap // Bitmap to run
4
...
}
{:Link
100
:EventSource 1
:EventType IsRunning
:LinkEffect (
:CallActionSlot (500 1)
:CallActionSlot (500 2)
)
}
{:Link
101
:EventSource 2
:EventType IsRunning
:LinkEffect (
:CallActionSlot (500 1 )
:CallActionSlot (500 2 )
)
}
{:Link
102
:EventSource 1
:EventType IsStopped
:LinkEffect (
:CallActionSlot (500 2)
)
}
{:Link
103
:EventSource 2
:EventType IsStopped
:LinkEffect (
:CallActionSlot (500 2 )
)
}
{:TokenGroup
500
:MovementTable (
( 1 2 3 )
( 1 2 3 )
)
:TokenGroupItems (
( 3
:ActionSlots (
( :MoveTo ( 500 2 ) )
( NULL )
( NULL )
)
)
( 3
:ActionSlots (
( :MoveTo ( 500 3 ) )
( :MoveTo ( 500 1 ) )
( NULL )
)
)
( 3
:ActionSlots (
( NULL )
( :MoveTo ( 500 2 ) )
( :Run ( 4 ) )
)
)
)
}
I think the TokenGroup solution has the advantage that you can easily add
new dependencies without adding a lot of objects.
Regards,
Andreas
-- o _ Andreas Kraft (\_|_) GMD FOKUS, kraft@fokus.gmd.de, +49 30 3463-7232 T> ] [ The sky is the limit