Author Topic: Looping  (Read 8193 times)

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Looping
« 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.
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

lightspeed

  • Hero Member
  • *****
  • Posts: 6763
    • View Profile
Looping
« Reply #1 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 !!![:)]
 

GT40

  • Hero Member
  • *****
  • Posts: 2095
  • Hey, I see you!
    • View Profile
    • My Bots
Looping
« Reply #2 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. [:(]
« Last Edit: July 05, 2007, 05:15:37 pm by GT40 »
Time to waste with skits, bots & other useless things? Why not visit
http://gt40.chez-alice.fr/Haptek/MyBots.htm ? Oops, sorry, a museum!

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Looping
« Reply #3 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 [^]
« Last Edit: July 05, 2007, 04:25:47 pm by freddy888 »

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Looping
« Reply #4 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.
« Last Edit: July 05, 2007, 07:55:13 pm by markofkane »
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

GT40

  • Hero Member
  • *****
  • Posts: 2095
  • Hey, I see you!
    • View Profile
    • My Bots
Looping
« Reply #5 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! [:)][:)][:)]
Time to waste with skits, bots & other useless things? Why not visit
http://gt40.chez-alice.fr/Haptek/MyBots.htm ? Oops, sorry, a museum!

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Looping
« Reply #6 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.



Download Attachment: b4_clap.zip
1.28 KB
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

GamerThom

  • Sr. Member
  • ****
  • Posts: 408
    • View Profile
    • http://www.charctercreationsanddesignworks.us/index.html
Looping
« Reply #7 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. [;)]
« Last Edit: July 05, 2007, 10:25:41 pm by GamerThom »
Gamer-T

GT40

  • Hero Member
  • *****
  • Posts: 2095
  • Hey, I see you!
    • View Profile
    • My Bots
Looping
« Reply #8 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? [?]
Time to waste with skits, bots & other useless things? Why not visit
http://gt40.chez-alice.fr/Haptek/MyBots.htm ? Oops, sorry, a museum!

GamerThom

  • Sr. Member
  • ****
  • Posts: 408
    • View Profile
    • http://www.charctercreationsanddesignworks.us/index.html
Looping
« Reply #9 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. [;)]
« Last Edit: July 06, 2007, 07:39:16 am by GamerThom »
Gamer-T

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Looping
« Reply #10 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.

GamerThom

  • Sr. Member
  • ****
  • Posts: 408
    • View Profile
    • http://www.charctercreationsanddesignworks.us/index.html
Looping
« Reply #11 on: July 06, 2007, 01:14:12 pm »
Yep! About 50 years or so. [;)] [:o)]
Gamer-T

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Looping
« Reply #12 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
 

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
Looping
« Reply #13 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.
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

GT40

  • Hero Member
  • *****
  • Posts: 2095
  • Hey, I see you!
    • View Profile
    • My Bots
Looping
« Reply #14 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. [:)]
Time to waste with skits, bots & other useless things? Why not visit
http://gt40.chez-alice.fr/Haptek/MyBots.htm ? Oops, sorry, a museum!