In this technique, you hit a button to cause a flame appear
above a volcano. Similarly, in the IDC, you were stepping on
a floor tile to trigger this. The flame is a 80-frame image sequence
mapped onto one rectangle. The movie sequence is started every
time the button is hit.
keyboardV is a CHOP containing one channel that
polls the V key. Down is 1, up is 0. record1 is a time history
of the keyboard state (graphed blow).
We use the count CHOP again, but here we use
it to count the time since the last key press. We set it to count
the number of frames since the key press, and let it keep on
counting until the next key press so that the image sequence
plays to completion.
|
|
The Limit CHOP makes the counting stop at 81, the last frame
of the flame image sequence, which is black, like the first frame
of the sequence.
Then we again name the channel and connect it to a texture
map index of a material, as we did in the prior example on sequencing
images when you hit a drum pad.
Actually, we could have named the channel right
in the keyboardV CHOP, eliminated the record CHOP, and limited
the counting in the count CHOP, reducing the CHOPs to two.
|
|
|