From: Andrew J. <an...@la...> - 2002-07-06 09:27:17
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> </head> <body> Because Drake Wilson asked for a work around for a non existent feature I decided just to simply write it in. You can now trigger a function at the end of a movie. Its now in CVS download via:<br> <a class="moz-txt-link-freetext" href="http://pyzzle.sourceforge.net/download.html#cvs">http://pyzzle.sourceforge.net/download.html#cvs</a> or just update your CVS repository.<br> <br> Use it via the function call: <br> <font color="#ff0000">movie.play_trigger(<i>ArrayPos</i>, <i>myMovietriggerFn</i>, <i>useCursor</i>)</font> -> None <br> <br> where: <i>ArrayPos</i> is the movies position in the array <i>Node</i>.moviefile.<br> <i>myMovietriggerFn</i> is a Pointer to the function you wish to call at the end of the movie<br> <i>useCursor</i> = 0, 1 Give player cursor control while movie is playing. Only use this when neccessary. It defults to 0.<br> <br> A few notes:<br> - I was having trouble with logical node changes with the new trigger function so I have written a new node change function:<br> <br> <font color="#ff0000">pyzzle.change_node(<i>Node</i>)</font> -> None<br> <br> Use this function now when ever a logic node change is required. You now cannot hardwire the new node in via nodedata.nextslide = <i>Node</i>. Well you can but things might get interesting.<br> <br> - Currently the trigger function it only exists for non-looping movie. <br> <br> - Remember only one mpeg can be played at one time in pyzzle. So do not try to use the trigger function to play two or more movies simultaneously. <br> <br> - Because at the moment I do not have any good way to demonstrate it ive commented out its call in the demogame.py file. <br> To see it in action change line 157 in demogame.py: <br> from movie.play(0,1,1) <br> to movie.play_trigger(0,myMovietrigger,1) <br> (The commented out function behind the 1st function)<br> <br> then run demogame.py. I hope you like it (;<br> <br> - Its fresh in CVS so please report any bugs.<br> <br> In game objects bugs squashed BTW.<br> <br> Have fun. Anymore feature requests please fire them off. Im very happy to consider them.<br> <br> Andy<br> <br> </body> </html> |