From: Andrew J. <an...@la...> - 2002-01-04 13:49:15
|
Im defently not going to bother you with every minor cvs update I make, but I think this one is important. It changes the way the tripwire function implemation works. Right 1st off the tripwire function has become a module and is now called slidechange in the slidechange.py file. This function is used in a simmilar way to the gamelogic function. But unlike the gamelogic function it is called on every transition between slides. Its main use is to control the music or ambient sounds, but it can also be use to manipulate the nodedata in the nodedata file like gamelogic does it could even call the gamelogic function <- still untested. If you have a close look you can see that it moves that random moving button back in a specific place on the exit of view3_2, but thats only kids stuff it could be used for much more powerfull things. So slidechange has access to the following tripwire functions: tripwire.onEntrance( /slide/ ) -> bool this returns true if the slide /slide/ is entered. Example: if tripwire.onEntrance( view1_1 ): print 'Well you entered slide view1_1 you are now dead!' else: print 'Well you not dead yet.' tripwire.onExit( /slide/ ) -> bool this returns true if the slide /slide/ is exited. tripwire.transition( /slide1/ , / slide2/ ) -> bool this returns true if player 'steps' between /slide1/ and /slide2/ . Thats it fokes. Have fun and remember to backup you own data files before you update. (-: Oh yeah if anyone want more functions for the slidechange module just ask. See ya Andy |