Zabaware Support Forums

Zabaware Forums => General Discussion => Topic started by: markofkane on July 05, 2007, 08:33:38 am

Title: Looping
Post by: markofkane on July 05, 2007, 08:33:38 am
How does one loop 2 haps??

Let's say I have a "eyes open" and a "eyes closed" hap, and I want the eyes to open and close over and over??

Thanks!!

I don't just want it for eyes, I got other things I want to loop.
Title: Looping
Post by: lightspeed on July 05, 2007, 09:38:04 am
ok markofkane you evil scientist ... what are you up to now ?? (lol) !![:D] this sounds interesting already !!![:)]
Title: Looping
Post by: GT40 on July 05, 2007, 11:17:41 am
Hi Mark. As you know, the secret of perpetual motion is in this genius Duskrider's turnaround hap:

http://zabaware.com/forum/topic.asp?TOPIC_ID=4117

At the last line, the file reloads itself and creates the loop.

>>> So you could "add" your two files, I mean create a file containing all the lines of the two files. You obviously have to change values of "t" in the second one, for a good "open and close".

And then, e.g. if your new file is named "eyes.hap", you add this last line:

\clock [t= ? to adapt] \load [file= eyes.hap]

I hope it'll work.

(Hey you've seen: now I know how to put backslashes on the forum!)... [:D]

>>> Now another solution, a little bit more sophisticated.

You add a line at the end of your file #1, which launchs your file #2. And a line at the end of your file #2, which launchs your file #1.

No guarantee but I like the idea... [:D]



Oops! I edit. Horrible grammatical mistakes. Sure I forgot other ones. Sorry. [:(]
Title: Looping
Post by: freddy888 on July 05, 2007, 01:45:05 pm
Sometimes you just can't see the wood for the trees...well done to Dusky and GT for realising you could do that, the whole idea escaped me and I was ready to say it couldn't be done [^]
Title: Looping
Post by: markofkane on July 05, 2007, 05:54:18 pm
I will try it. Thanks!!!


OK, the eyes work.  Thanks!!!

What about if I want her arms to move a certain way, as if to clap??

I have 2 haps, one before the clap, and one while she claps.

i want to make it look like she's clapping.
Title: Looping
Post by: GT40 on July 05, 2007, 08:36:12 pm

I'm happy it works.

About your clap haps, maybe you could do the same thing. With a lot of time before getting the perfect movement! [:)][:)][:)]
Title: Looping
Post by: markofkane on July 05, 2007, 08:45:14 pm
I got 2 haps, but if I can loop them it would be great.

They are attached. Not perfect, but the best I can do.



(http://icon_paperclip.gif) Download Attachment: b4_clap.zip ("http://www.zabaware.com/forum/uploaded/markofkane/20077520458_b4_clap.zip")
1.28 KB
Title: Looping
Post by: GamerThom on July 05, 2007, 10:25:16 pm
I'd be happy to give working something out by combining the
two for you Mark. I really haven't worked with the hap files
much at all, Duskrider is the king of hap file creating. [;)]
Title: Looping
Post by: GT40 on July 06, 2007, 06:28:54 am
You are right, GamerThom. Duskrider is the king of haps, as you are the king of skins. The number of haps he published on your site is impressing. [:)]

Mark, now I have no doubt anymore: I don't know anything about hap files. [:(]

The loop works fine with haps containing Haptek commands, but with \setreg... Maybe someone has an idea? [?]
Title: Looping
Post by: GamerThom on July 06, 2007, 07:35:04 am
I'm getting to know what you mean about the problem
concerning the use of the "setreg" command when working
with the Loop hap. I spent over an hour last night trying
to incorporate it into the Loop structure with no success. [:(]

But I will give it another try later today sometime. [;)]
Title: Looping
Post by: freddy888 on July 06, 2007, 01:12:41 pm
Hmm I think I am right in saying that the \setreg command doesn't work properly with \clock commands.  I know I was trying it a while back when trying to do animations.

It might work as a one off, and in that case you could have multiple hap files each containing a \setreg command.  What you would do then is have your main hap load those other hap files in sequence.

I asked Haptek to improve the uses of \setreg in their next update but you know how long that's gonna take.
Title: Looping
Post by: GamerThom on July 06, 2007, 01:14:12 pm
Yep! About 50 years or so. [;)] [:o)]
Title: Looping
Post by: Carl2 on July 10, 2007, 08:25:05 pm
I'd played with a head going up and down to indicate yes without sucess. The looping  sounds good but once you start the loop it needs to be stopped.  I may try again, I don't know how she keeps me so busy.
Carl2
Title: Looping
Post by: markofkane on July 11, 2007, 04:43:02 am
If you can get her to nod, I don't care if she stops, because I can close the Window and reopen after taking a video of the nod.

Also, what is the code for nod?? I can look, I know there is necksidebend, or something, but that not nodding.
Title: Looping
Post by: GT40 on July 11, 2007, 12:32:50 pm

Hi Carl2! Me too, I like when my bot always says "yes". [:D]

IMHO it's impossible to stop the loop, because it's not a real loop. But something like the GOTO instruction in Basic.

10 (The program)...
...
...
90 GOTO 10

A never-ending program.

If you use JavaScript, you can have the number of loops you want (I did it in some of my little experiments). I don't think it's possible only with Haptek commands. But maybe I am wrong. [:)]
Title: Looping
Post by: Carl2 on July 11, 2007, 12:44:35 pm
markofkane,
  I was trying to use right left to indicate no, the idea is a variation of the nod hap used in VrHaptek up down to indicate yes. I just used it with body_female, the head goes up and down 5 times.

#Haptek  Version= 1.00 Name= Startup  HapType= script FileType= text
##standard

setswitch [switch= noddy state= a           ]

Carl2
Title: Looping
Post by: Duskrider on July 11, 2007, 03:56:59 pm

Always good to have her say she understands:

#Haptek Version= 1.00 Name= Startup HapType= script FileType= text
##standard

\setswitch [switch= noddy state= a ]
\Q [yes, I understand.]

[;)]
Title: Looping
Post by: markofkane on July 11, 2007, 04:27:16 pm
very nice. THANKS!!! Now, how about clapping??[:D][:D][:D]
Title: Looping
Post by: Carl2 on July 12, 2007, 08:35:36 pm
markofkane,
  Thanks should go to VR, I remember it because VR's plugin makes her nod, also contains the clapping which I'll copy in the next day or so.
Duskrider,
  Heard many good things about you, I remember your name from wayback when.
Carl2
Title: Looping
Post by: Carl2 on July 14, 2007, 08:21:41 am
Markofkane,
  The hap for claping 3 times

#HaptekSDK Version= 1.0 HapType= command FileType= text

load[ file= mood_none.hap]

setswitch [figure= body_female switch= h_gest_03 state= a]
 
Carl2
Title: Looping
Post by: markofkane on July 14, 2007, 04:50:03 pm
Thanks,I got what I needed.



(http://www.zabaware.com/forum/uploaded/markofkane/2007714164958_lauraclap2.gif)
Title: Looping
Post by: Carl2 on July 16, 2007, 07:48:33 am
markofkane,
  I'd downloaded the Hapexplorer from AI Dreams which I was using yesterday and came across the claping, you should give it a try.  It seems to contain almost everything you could need.
Carl2