Zabaware Support Forums
Zabaware Forums => General Discussion => Topic started by: wgb14 on January 02, 2006, 12:25:26 am
-
Hi all,
I have the following script, where i want to set the mood of my character and execute the remainign of sounds and animations. When i am loading to to any of the haptek characters it is setting the mood correctly, but refuses to execute the rmeianing of the steps (play the sound file and aniamtions). Any ideas what i am doing wrong?
#Haptek Version= 2.00 HapType= script FileType= text
## world It
load [file= [data/standard/safe_moods/Hap_Psycho.hap]]
load [file= [walking.ogg]]
clock [t= 1] setswitch [figure= fullbod switch= walk3 state= 1]
clock [t= 10] setswitch [figure= fullbod switch= walk3 state= off]
-
Some ideas:
The lines look ok at first glance, praps you need to be more specific with the .ogg path ?
Try clocking all the lines, the hap may well be taking too long to load/process meaning the .ogg is not getting processed - the Player attempts to run things at the same time unless you time them.
I have found using the /clock function to be troublesome - take a look at Doc's Haptek Help CHM, in it he explains a method of preloading files first and THEN using them once they are in the player. I think you will have more luck that way:
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=2899
-
Try it with "HapType= command" in the header. Sometimes it does the trick. I still haven't found out why.
-
Hi,
Unfortunately, none of the above solutiosn work. It seems quite difficult to call other scripts from a hap script. Any other ideas?
Thanks
-
Could you mail me the script, because the forum messes up the code?
-
Hi wgb14,
Put your walking.ogg file in your skins folder.
Open your girl and drop this hap on her,
This should get you what you want.
Neil.
Download Attachment: 20061542631_Walking.rar (http://"http://www.zabaware.com/forum/uploaded/nige/20061542631_Walking.rar")
-
Hi,
NIGE, i can not download your script. Could you please send it to me via email? Also I tried to re-write the script as follows, but again is not working with the full body characters --- it seems to work just fine with people putty. The whole point of this exercise is to learn how to use the clock function effectively.
#Haptek Version= 2.00 Name= myScript5.hap HapType= script FileType= text
## world It
##prereq= Shy_and_In_Love
##prereq= Psycho
clock [t= 0] switchscript[figure= standard file= [Shy_and_In_Love] i1= 1 i2= 1 ]
clock [t= 1.334] speak[figure= standard hi my name is maria ]
clock [t= 3.292] switchscript[figure= standard file= [Psycho] i1= 1 i2= 1 ]
-
Hi,
I modified the script as follows, but again it doesn't work. Can we call external scripts from inside a script file and time them accordingly? I would like to control the moods and animations of a story telling character according to the part of the story she is telling. For example, in the 3 second of the story, the mood of the character changes from standard to sleepy and so on. Is that possible?
#Haptek Version= 2.00 Name= myScript5.txt HapType= script FileType= text
## world It
clock [t= 1] switchscript [file= hapsSleepy.txt] i0=1]
clock [t= 2] q2 [s0= [hi my name is maria ]]
clock [t= 3] switchscript [file= hapsdance.hap] i0=1]
-
wgb14,
before you can switch to any script you need to load it with \load. Once loaded a script must be addressed by using the name specified in the header of that script.
-
Hi,
This is my script now:
#Haptek Version= 2.00 Name= myScript5 HapType= script FileType= text
## world It
#Hap_Psycho
#Hap_Broken_Hearted
load [file= [data/standard/safe_moods/Hap_Psycho.hap] i0=0]
load [file= [data/standard/safe_moods/Hap_Broken_Hearted.hap] i0=0]
clock [t= 1] switchscript [file= Hap_Psycho] i0=1]
clock [t= 3] q2 [s0= [hi my name is maria ]]
clock [t= 6] switchscript [file= data/standard/safe_moods/Hap_Broken_Hearted] i0=1]
Again, it doesn't work. Any ideas what i am doing wrong?
-
You used slashes instead of backslashes, but unfortunately I still can't get it to work. Does this mean that you can't time commands like \switchscript?
Actually, I am at a complete loss myself. euhm, Duskrider, anyone, help!! [:0]
-
Hi,
This is the actual mood change. Not it works fine, but not all the times.
#Haptek Version= 2.00 Name= myScript5 HapType= script FileType= text
## world It
load [file = data/standard/safe_moods/Hap_Psycho.hap i0=0]
load [file= data/standard/safe_moods/hap_scared.hap i0=0]
clock [t= 1] switchscript [file= [Hap_Psycho] i0= 1 i1=1]
clock [t= 5] q2 [s0= [hi my name is maria ]]
clock [t= 10] switchscript [file= [hap_scared] i0=1 i1=0]
-
wgb14,
I know you read my mail i sent you,
Was just wondering if that was what you wanted?????
If it worked the way you wanted??????
Neil. [?]
-
Hi Nige.
No your script works only at a certain level. The clock [t= 1]load [file= [data/standard/safe_moods/Hap_Psycho.hap]is not working. The character jumps at the next instruction directly (clock [t= 2.5]load [file= data/standard/skins/walking.ogg]). I think its got something to do with the paths.
Thanks
-
This script (shown below) is really killing me. While for the moods is working just fine, when i change the mood files to animation files only the second animation script is executed. Any ideas why?
#Haptek Version= 2.00 Name= myScript5 HapType= script FileType= text
## world It
load [file = data/standard/safe_moods/Hap_Psycho.hap i0=0] --> change that to fullbodyturnback.hap
load [file= data/standard/safe_moods/hap_scared.hap i0=0] --> change to shortwalk.hap
clock [t= 1] switchscript [file= [Hap_Psycho --->change that to turnback.hap] i0= 1 i1=1] ---- the animation turnback.hap refuses to play, any ideas why?
clock [t= 5] q2 [s0= [hi my name is maria ]] --- this is executed just fine
clock [t= 10] switchscript [file= [hap_scared --->change that to shortwalk ] i0=1 i1=0] ----- only this animation is executed
-
Wgb14, I don't think you are doing anything wrong. I think the current Haptek scripting abilities are probably rather limited. [:D]
-
I had problems with the Haptek timing too, i wonder if the SDK is out of pace with the Player. Perhaps you should try emailing Haptek and see if they can send you anything on using the /clock commands.
-
Ok guys, here is the script that does the trick. The whole problem in offline scripting is to master the paths.
#Haptek Version= 2.00 Name= animation_change HapType= script FileType= text
## world NewCharacter
load [file= [data/animations/dance.hap] i0=0]
load [file= [data/animations/shortwalk.hap] i0=0]
clock [t= 1] q2 [s0= [hi my name is maria ]]
clock [t= 3] switchscript [file= [dance] i0= 1 i1=1]
clock [t= 10] switchscript [file= [shortwalk] i0= 1 i1=0]
-
Yep, you're right. And the parameters function as well - in contrary to what I suspected. Thanks Wgb14!
-
You are more than welcome Dr.Benway. Perhaps the admin should consider opening a section dedicated to character scripting.
-
Glad to hear that, but who are you addressing right now, because nobody is running the board here? Unless you mean the DG-forum ofcourse.
-
well worked out wgb14 [:)]
-
Dr.Benway all i am suggesting is that perhaps the admin should consider opening a section in Hal's forum dedicated to character scripting. It would be fun to be able to share the scripts that we make for our haptek characters
-
I knew what you meant, but I just wanted to stress the point that Zabaware and its forum is only managed by Robert Medeksza. Never mind. [:D]
-
We've got a Hap section over at DG, I was asking for haps a while back but I don't think many people apart from Neil and Dusk were doing any and they prefer for the most part to keep Zaba as their base. You're welcome to make use of it anyway.
I havent done a great deal with finished haps lately, but when I get hold of Hal6 in a few days I will more than likely be going back to some more hap writing.
-
Hi Freddy,
In the next few months i will make a number of haps for different uses in my project (not directly related to Hal). I will post everything here and to the digital girl forum.
Thanks
-
wgb14,
Interesting work your doing, I haven't got into that yet, still in the display emotions and changing clothing. I hope you keep putting in posts so I'll have a little knowledge before I start. Also DG has a pretty good forum and could use your input.
Carl2