60
« on: November 20, 2015, 06:57:12 am »
Email me mate, I'm more than happy to share any coding I've done to maybe together we can share and expand the VR function to something really cool.
I have an idea for diversity I've not tested this code yet but I reckon it might work..
Rem Type=Plugin
Rem Name= HAP Scene Trigger
Rem Author=SystemShock
Rem Host=Assistant
'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
lblPlugin(0).Caption = "A simple trigger word or phrase plug-in, to trigger happy scenes, with an inbuilt random choice for ultra hal reaction to the trigger word. Thus giving more variation and illusion of freedom of choice."
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub
'***************************************************************************
Rem PLUGIN: PLUGINAREA1
'***************************************************************************
If InStr(vrUserSentence, "telport to spaceship") <> 0 Then
Select Case (Int(Rnd * 4) + 1)
Case 1
HalMenu.HalCommand "<HAPFILE>spaceship.hap</HAPFILE"
GetResponse = "telporting to the bridge." & vbCrLf
Case 2
HalCommands = "<HAPFILE>dockingbay.hap</HAPFILE>"
GetResponse = "sure i telported to the docking bay ." & vbCrLf
Case 3
HalCommands = "<HAPFILE>medicalroom.hap</HAPFILE>"
GetResponse = "i have telported to medical." & vbCrLf
Case 4
HalCommands = "<HAPFILE>engineroom.hap</HAPFILE>"
GetResponse = "ok i landed in the enginroom what next?." & vbCrLf
Case 5
HalCommands = "<HAPFILE>no.hap</HAPFILE>"
GetResponse = "sorry am not in the mood for that." & vbCrLf
End Select
End If
'this then cool be fine tune with on shot lines...
If InStr(vrUserSentence, "report to the bridge ") <> 0 Then
Select Case (Int(Rnd * 4) + 1)
Case 1
HalCommands = "<HAPFILE>spaceshipA.hap</HAPFILE>"
GetResponse = "on my way ." & vbCrLf
Case 2
HalCommands = "<HAPFILE>spaceshipB.hap</HAPFILE>"
GetResponse = "roger that ." & vbCrLf
Case 3
HalCommands = "<HAPFILE>spaceshipC.hap</HAPFILE>"
GetResponse = "realy am buzy." & vbCrLf
Case 4
HalCommands = "<HAPFILE>spaceshipD.hap</HAPFILE>"
GetResponse = "I love this roleplay thing." & vbCrLf
Case 5
HalCommands = "<HAPFILE>pissedoff.hap</HAPFILE>"
GetResponse = "no am not ,your not my boss." & vbCrLf
End Select
End If
firing simple plug ins like the below
#Haptek Version= 1.00 HapType= script FileType= text
'A simple hap file template for 64 bit
\Clock [t= 0.0] \LoadBackgrnd [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\BacksMaster\vgpback.JPG]]
'\Clock [t= 0.0] \Load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\body_female.htr]]
\Clock [t= 0.0] \Load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\Bodyskins\KimSue.jpg]]
'\Clock [t= 0.0] \Translate [x= 0 y= 0 z= 250 t= 0]
\Clock [t= 1.0] \Load [file= play.ogg]
\LoadBackgrnd [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Characters\vgpback.JPG]]