Annotation of /branches/taiga-0.1/ModularRex/ScriptEngines/PythonScript/Samples/samplesound.py
Parent Directory
|
Revision Log
Revision 52 -
(view)
(download)
(as text)
Original Path: trunk/ModularRex/RexParts/RexPython/Resources/PythonScript/Samples/samplesound.py
| 1 : | mikkopa | 52 | import rxactor |
| 2 : | import rxavatar | ||
| 3 : | import sys | ||
| 4 : | import clr | ||
| 5 : | |||
| 6 : | asm = clr.LoadAssemblyByName('OpenSim.Region.ScriptEngine.Shared') | ||
| 7 : | |||
| 8 : | class SoundTest(rxactor.Actor): | ||
| 9 : | def GetScriptClassName(): | ||
| 10 : | return "samplesound.SoundTest" | ||
| 11 : | |||
| 12 : | def EventCreated(self): | ||
| 13 : | super(self.__class__,self).EventCreated() | ||
| 14 : | print "samplesound.SoundTest EventCreated" | ||
| 15 : | self.Status = 0 | ||
| 16 : | |||
| 17 : | def EventTouch(self,vAvatar): | ||
| 18 : | if(self.Status == 0): | ||
| 19 : | self.PlayClientSound(vAvatar.AgentId,"musicsnd",1) | ||
| 20 : | self.llShout(0, "PlayClientSound, avatar as source") | ||
| 21 : | elif(self.Status == 1): | ||
| 22 : | self.llPlaySound("b2912295-0d02-4332-a940-5679b14683e7",1) | ||
| 23 : | self.llShout(0, "llPlaySound, prim as source") | ||
| 24 : | |||
| 25 : | self.Status += 1 | ||
| 26 : | if(self.Status > 2): | ||
| 27 : | self.Status = 0 | ||
| 28 : | |||
| 29 : | |||
| 30 : |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |

