|
|
Making your doll blink. Some things come after ;@initialize() but before ;@begin(). These are things that we want to happen while the Kiss file is loading but before we begin playing with it. One these things is as follows, and we need it when we want a doll to blink: ;@initialize() Getting a doll to blink.
I started life doing single cel blinks but decided that it was too sudden and also that using more cels created a more sultry blink. Whichever you prefer, this is what you do: Make the cels, enter them on the cnf file and unmap them. You need a body or head cel and one or two blink cels, so make 'em. These are what I used to make the animations above and are similar to the ones I used in the doll.
Turn them into cels and... ; ** Cel entries ** ...when the doll opens in the Kiss viewer no blink cels are visible. Timers. Blinking requires the use of timers, one event following another with timed delays between events. The numbers in blue in the following are only used as notes and are not part of the code. I'll repeat the code at the bottom of the page without the blue numbers, for copy/pasting. ;@begin() 1 ;@ timer(1, 5000). This timer has a number (1) and will set off alarm (1) 5000 milliseconds after the doll is loaded. 2. ;@alarm(1). Timers set off 'alarms', the alarm number must match a timer number. In this case (1) 3. The first 'blink.cel' maps 4. ;@ timer(2, 100) the last event related to alarm(1) is that I set another timer to set off an alarm in 100 milliseconds time. 5. Similar to 2 above, timer (2) sets off alarm (2) after 100 milliseconds 6. I unmap blink.cel because I do not want it on permanently... 7. ...and map blink1.cel 8. I set another timer(3) to set off alarm(3) in 100milliseconds 9. alarm (3) triggers... 10. ...and I unmap blink1.cel because I do not want it on permanently 11. This closes the loop to set off alarm (1) again after 5000 milliseconds Warning. Each timer and alarm much be uniquely numbered from every other one. You cannot have two alarms called alarm(1), if you do the viewer will set the first alarm off and ignore the second. Download the two small lzh files if you would like to compare the two. Blink (two cel blink) and Blink1 (single cel blink) Copy and paste code: ;@begin() For a single blink sequence: ;@begin()
© 2000 Keith Lindsay-Cameron. All rights reserved. |