I am posting this so any other coders can see how i been doing things....
first i added to vrhaptec lines to trigger the new haps that do the grunt work...
(using the free coding program Notepad++ ...it support c++ syntax and tabs... )
added at the end of this section in vrhaptec and saved as a .uhb..... personal I save a cope of and called VRSHODAN . '------------------
' Manages some movement on the screen
'------------------
' where we set up the space ship set cotume chage , LOADS space ship hap...hair change,load mike prop,background change,ogg brackgroung sound/music turn of at the momment to help with load time...changes background clip we don't have dissappring chator issues.
If InStr(vrUserSentence, " go to spaceship ") <> 0 Then
vrFile = "spaceship.hap"
GetResponse = " welcome back captain, anything to report! "
End If
' where we set up the smoking habit part one. smoking is trigger by word...is triggered by boredom is in SHODANlonlyness2
If InStr(vrUserSentence, "smoke") <> 0 Then
vrFile = "zSmokeingShocked.hap"
GetResponse = " thanks, don't mind if i do ,thank you"
End If
' where we set up cage Themes
If InStr(vrUserSentence, " cage now ") <> 0 Then
vrFile = "YourCage.hap"
GetResponse = " sorry master tee heee he "
End If
'below trigger better as 3 word groups seem to fire so much better 
If InStr(vrUserSentence, " might not work ") <> 0 Then
vrFile = "YourCage.hap"
GetResponse = " sorry master tee heee he "
End If
NEXT i turn of day and night in vrhaptec..the ' is comments band turn of code line in UHP files...
I have a time of day light system lined up for this section a bit later..in VRSHODAN dev
once the new light system LIGHTINGMASTER coded this weekend'------------------
' Changes background according to the current time
'------------------
' vrNight is a CustomMem variable
' I use it to avoid reloading the same jpg every time
' I load the jpg only when the day/night has changed
' vrNight = 0 -> not know
' vrNight = 1 -> it's set to night
' vrNight = 2 -> it's set to day
'
'If vrHour > 8 And vrHour < 19 Then ' it's day
' If vrNight <> "2" Then
' vrNight = "2"
' vrFile = "DayBack.JPG"
' HalCommands = "<HAPBACK>" & vrFile & "</HAPBACK>"
' GetResponse = GetResponse & "It's bright today!"
' vrHour = vrHourOld
' HalBrain.ReadOnlyMode = True
' End If
'Else ' it's night
' If vrNight <> "1" Then
' vrNight = "1"
' vrFile = "NightBack.JPG"
' HalCommands = "<HAPBACK>" & vrFile & "</HAPBACK>"
' GetResponse = GetResponse & "It's a bit dark now!"
' vrHour = vrHourOld
' HalBrain.ReadOnlyMode = True
' End If
'End If
Now for the grunt work in the HAP files.....
So SO much Thanks must be given to the hap os team
for there work reading there code has meant i can do this.
So guy give them the credit for the smarts...
I am just a good modder
Spaceship.hap it in c++
where # it the comments bolded here for a much easier read
#Haptek Version= 2.00 Name= spaceship HapType= script FileType= text
##standard
#long distance camera settings \camera[name= FrontClip f0= 20]
\camera[name= BackClip f0= 5000]
#This is preprogrammed as non-interruptible script which can only be halted with a stop command or the loading of another non-interruptible script file
#You can modify this script file for use with the Hap Windows OSI theme function soon to be ultra hal theme function care of VRSHODAN.
#The Hap Windows OSI will only fully support the use of body_female body_male or most any compatible standard head character
#Follow thru with the current script format and have fun, makes fully automated or user interactive presentations for use with OSI themes ultra hal theme function care of VRSHODAN.#and let set it all up\setscript[i0= 1 i1= 1]
\setmood [action= [sw= GestureMaster m= sleep]]
\Stop [tape= alien2.bvh]
\Stop [file= RockStar.ogg]
\Stop [file= ThemeIntro.ogg]
\setperson[figure= body_female]
\setSwitch [switch= R_handPieces]
\setSwitch [switch= L_handPieces]
\setswitch [switch= walk3 state= off]
\setswitch [switch= walksine state= off]
\setswitch [switch= fastrun state= off]
\setswitch [switch= armattax state= off]
\setSwitch [switch= oneb state= off]
\setSwitch [switch= onea state= off]
\setreg [name=HeadSideBend f0=0.0000]
\setreg [name=HeadForward f0=0.0000]
\setreg [name=HeadTwist f0=0.0000]
\setreg [name=NeckForward f0=0.0000]
\setreg [name=NeckTwist f0=0.0000]
\setreg [name=NeckSideBend f0=0.0000]
\setreg [name=LShoOut f0=0.0000]
\setreg [name=RShoOut f0=0.0000]
\setreg [name=LShoForward f0=0.0000]
\setreg [name=RShoForward f0=0.0000]
\setreg [name=RShoTwist f0=0.0000]
\setreg [name=LShoTwist f0=0.0000]
\setreg [name=LClavicalForward f0=0.0000]
\setreg [name=RClavicalForward f0=0.0000]
\setreg [name=LClavicalUp f0=0.0000]
\setreg [name=RClavicalUp f0=0.0000]
\setreg [name=RElbowBendJoint f0=0.0000]
\setreg [name=RElbowTwist f0=0.0000]
\setreg [name=LElbowBendJoint f0=0.0000]
\setreg [name=LElbowTwist f0=0.0000]
\setreg [name=RWristFlop f0=0.0000]
\setreg [name=RWristWave f0=0.0000]
\setreg [name=LWristFlop f0=0.0000]
\setreg [name=LWristWave f0=0.0000]
\setreg [name=TorsoSideBend f0=0.0000]
\setreg [name=TorsoTwist f0=0.0000]
\setreg [name=TorsoBow f0=0.0000]
\setreg [name=LumbarSideBend f0=0.0000]
\setreg [name=LumbarTwist f0=0.0000]
\setreg [name=LumbarBow f0=0.0000]
\setreg [name=RThighForward f0=0.0000]
\setreg [name=RThighOut f0=0.0000]
\setreg [name=RThighTwist f0=0.0000]
\setreg [name=LThighForward f0=0.0000]
\setreg [name=LThighOut f0=0.0000]
\setreg [name=LThighTwist f0=0.0000]
\setreg [name=RKneeBack f0=0.0000]
\setreg [name=LKneeBack f0=0.0000]
\setreg [name=LKneeTwist f0=0.0000]
\setreg [name=RKneeTwist f0=0.0000]
\setreg [name=RAnkleFlop f0=0.0000]
\setreg [name=LAnkleFlop f0=0.0000]
\setreg [name=RAnkleWave f0=0.0000]
\setreg [name=LAnkleWave f0=0.0000]
\setreg [name=RFingerIndexTip f0=0.0000]
\setreg [name=RFingerIndexMid f0=0.0000]
\setreg [name=RFingerIndexOut f0=0.0000]
\setreg [name=RFingerIndex f0=0.0000]
\setreg [name=RFingerMiddleTip f0=0.0000]
\setreg [name=RFingerMiddleMid f0=0.0000]
\setreg [name=RFingerMiddleOut f0=0.0000]
\setreg [name=RFingerMiddle f0=0.0000]
\setreg [name=RFingerRingTip f0=0.0000]
\setreg [name=RFingerRingMid f0=0.0000]
\setreg [name=RFingerRingOut f0=0.0000]
\setreg [name=RFingerRing f0=0.0000]
\setreg [name=RFingerPinkyTip f0=0.0000]
\setreg [name=RFingerPinkyMid f0=0.0000]
\setreg [name=RFingerPinkyOut f0=0.0000]
\setreg [name=RFingerPinky f0=0.0000]
\setreg [name=RFingerThumbTip f0=0.0000]
\setreg [name=RFingerThumbMid f0=0.0000]
\setreg [name=RFingerThumbOut f0=0.0000]
\setreg [name=RFingerThumb f0=0.0000]
\setreg [name=LFingerIndexTip f0=0.0000]
\setreg [name=LFingerIndexMid f0=0.0000]
\setreg [name=LFingerIndexOut f0=0.0000]
\setreg [name=LFingerIndex f0=0.0000]
\setreg [name=LFingerMiddleTip f0=0.0000]
\setreg [name=LFingerMiddleMid f0=0.0000]
\setreg [name=LFingerMiddleOut f0=0.0000]
\setreg [name=LFingerMiddle f0=0.0000]
\setreg [name=LFingerRingTip f0=0.0000]
\setreg [name=LFingerRingMid f0=0.0000]
\setreg [name=LFingerRingOut f0=0.0000]
\setreg [name=LFingerRing f0=0.0000]
\setreg [name=LFingerPinkyTip f0=0.0000]
\setreg [name=LFingerPinkyMid f0=0.0000]
\setreg [name=LFingerPinkyOut f0=0.0000]
\setreg [name=LFingerPinky f0=0.0000]
\setreg [name=LFingerThumbTip f0=0.0000]
\setreg [name=LFingerThumbMid f0=0.0000]
\setreg [name=LFingerThumbOut f0=0.0000]
\setreg [name=LFingerThumb f0=0.0000]
\setreg [name=LocalRotateX f0=0.0000]
\setreg [name=LocalRotateY f0=0.0000]
\setreg [name=LocalRotateZ f0=0.0000]
\setreg [name=LocalTranslateX f0=0.0000]
\setreg [name=LocalTranslateY f0=0.0000]
\setreg [name=LocalTranslateZ f0=0.0000]
\setreg [name=RotateX f0=0.0000]
\setreg [name=RotateY f0=0.0000]
\setreg [name=RotateZ f0=0.0000]
\setreg [name=TranslateX f0=0.0000]
\setreg [name=TranslateY f0=0.0000]
\setreg [name=TranslateZ f0=0.0000]
\setreg [name=RLTranslateX f0=0.0000]
\setreg [name=RLTranslateY f0=0.0000]
\setreg [name=RLTranslateZ f0=0.0000]
#\Q let you run a number of things on one line and could be use a halsub routeens useein hal command menu funsion.. 
\Q[\SetMaterial[i0= 4 f0= 5]\SetMaterial[i0= 3 r= 0 g= 0 b= 0]\SetMaterial[i0= 2 r= .3 g= .3 b= .3]\SetMaterial[i0= 1 r= 1 g= 1 b= 1]\SetMaterial[i0= 0 r= 1 g= 1 b= 1]]
\Q[\SetMaterial[figure= hair5_9EXP i0= 4 f0= 5]\SetMaterial[figure= hair5_9EXP i0= 3 r= 0 g= 0 b= 0 a= 0]\SetMaterial[figure= hair5_9EXP i0= 2 r= .1 g= .1 b= .1 a= .1]\SetMaterial[figure= hair5_9EXP i0= 1 r= 1 g= 1 b= 1 a= 1]\SetMaterial[figure= hair5_9EXP i0= 0 r= 1 g= 1 b= 1 a= 1]]
\Q[\setdraw[i0= 1]\setdraw[figure= hair5_9EXP i0= 1]\delperson[figure= cowboyhat]\delperson[figure= mic]\delperson[figure= combathelmet]\delperson[figure= devilhorns]\delperson[figure= cage]]
\SwitchSpeedFactor[f0= 1]
\setmood [action= [sw= GestureMaster m= awake]]
#Preload ogg, accessories, background image files and load/settexture skin image on character, full file path required
#Hal will not automatically add the path of this theme script directory into the HapPlayer ..
note the path is C:\Program Files(86) or whatever for window 7 64 bit and windows eight so this means we have a 32 bit and 64 hap file and my pluging come in to flavours
with whipped cream and sprinkals...rest like this \Zabaware\Ultra Hal Assistant 6\Characters\mic.haptar
\Load [file= [C:\Program Files\Zabaware\Ultra Hal Assistant 6\Characters\mic.haptar] i0= 0]
\Load [file= [C:\Program Files\Zabaware\Ultra Hal Assistant 6\Characters\RockStar.ogg]
\Load [file= [C:\Program Files\Zabaware\Ultra Hal Assistant 6\Characters\Theme1Back.jpg] i0= 0]
\Load [file= [C:\Program Files\Zabaware\Ultra Hal Assistant 6\Characters\Theme1Skin.jpg]]
\Load [file= [62hands_on_hips.hap]]
\LoadBackgrnd [file= [Theme1IntroBack.jpg]]
\Q[\SetMaterial[figure= hair5_9EXP i0= 4 f0= .01]\SetMaterial[figure= hair5_9EXP i0= 3 r= 1 g= 1 b= 1 a= 0]\SetMaterial[figure= hair5_9EXP i0= 2 r= .6 g= .6 b= .6 a= .1]\SetMaterial[figure= hair5_9EXP i0= 1 r= 1 g= 1 b= 1 a= 1]\SetMaterial[figure= hair5_9EXP i0= 0 r= 1 g= 1 b= 1 a= 1]]
#Begin main script here
#Use starting clock value of at least one second in order give extra time for any preloads to complete
#You can use Q command to combine a few things together for one clock command or to make character speak
\clock [t= 0.05] \translate[x= 217 y= 10 z= 926 t= 0.1]
\clock [t= 1.00] \Q[\translate[x= 217 y= 10 z= 926 t= 0.1]\rotate[y= -180 t= 0.1]\load[file= [mic.haptar]]]
\clock [t= 1.50] \setswitch[switch= walk3 state= off]]]
\clock [t= 3.50] \rotate[y=0 t= 2]
'\clock [t= 4.50] \Q "I will try to sort hap in built voice cueing"'switchs are stated at the top of the file\clock [t= 5.25] \setswitch[switch= walk3 state= 1]
\clock [t= 5.5] \translate[x= 0 y= 0 z= 25 t= 5]
\clock [t= 10.5] \setswitch[switch= walk3 state=off]
#nice bit to too add to plug ins hips rember the the support code
\clock [t= 15.25] \setswitch [switch= hands_on_hips state= start]
\clock [t= 16.50] \rotate[y=-20 t= 2]
\clock [t= 17.25] \translate[x= 0 y= 0 z= 100 t= 5]
\clock [t= 20.50] \rotate[y=20 t= 2]
\clock [t= 22.25] \translate[x= 0 y= 0 z= 50 t= 10]
\clock [t= 25.50] \rotate[y=20 t= 2]
\clock [t= 30.25] \translate[x= 0 y= 0 z= 50 t= 10]
\clock [t= 31.50] \rotate[y=0 t= 2]
#Loadbackgrnd commands here\LoadBackgrnd [file= [Theme1IntroBack.jpg]]
# these can allso have a time clock to change be pre loaded#Other script stuff here
#lighting clock#Optional Happy mood settings can be changed or removed
\SetSwitchIntensity [switch= expMouthHappy f0= 0.800503 t= 0.9]
\SetSwitchIntensity [switch= expMouthSad f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= expBrowsSad f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= expMouthMad f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= expBrowsMad f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= expEyesTrust f0= 1.000000 t= 0.4]
\SetSwitchIntensity [switch= antiTrust f0= 0.900000 t= 0.4]
\SetSwitchIntensity [switch= expEyesDistrust f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= antiDistrust f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= blinks f0= 1.000000 t= 0.4]
\SetSwitchIntensity [switch= expBrowsCurious f0= 0.310000 t= 0.4]
\SetSwitch [switch= ego state= mid]
\SetSwitch [switch= agressMaster state= confront]
\SetSwitchIntensity [switch= energyHigh f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= energyLow f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= talkBob f0= 1.40000 t= 0.4]
\SetSwitchIntensity [switch= headEvadeHighE f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= headEvadeLowE f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= HighEnergyNoise f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= LowEnergyNoise f0= 0.200000 t= 0.4]
\SetSwitchIntensity [switch= browTalk f0= 0.700000 t= 0.5]
\SetSwitchIntensity [switch= visemes f0= 1.280000 t= 0.4]
There you go so that how the simple spaceship code works...
So for your own custom on cue theme edit as you see fit..set change the preloader to the files you want..load them on your time line set your
hope that is useful i wright about load custome