sprockets TV Commercial by Matt Campbell Greeting of Christmas Past by Gerry Mooney and Holmes Bryant! Learn to keyframe animate chains of bones. Gerald's 2024 Advent Calendar! The Snowman is coming! Realistic head model by Dan Skelton Vintage character and mo-cap animation by Joe Williamsen
sprockets
Recent Posts | Unread Content
Jump to content
Hash, Inc. - Animation:Master

Recommended Posts

Posted

Expression experts

 

Was wondering if its possible to have a statement that says

 

if (Chortime() >.5 and Chortime()

 

 

I know this works

If(ChorTime()>0.5,ChorTime()*1000){,0}))

 

it passes the variable Chortime()*1000 after 15 frames which is .5 of 30

 

What I was thinking was lets say Thom is wearing a bowtie at frame 15 to 30 a good looking female thom goes by and therefore his bowtie spins

I tried a number of combinations but get a syntax err

 

Anyone know ?

  • Replies 11
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

I'm not an "Expression expert", but you might try nesting IF statements.

 

if (Chortime() >.5, if( Chortime()<1,Chortime()*1000{,0}))

 

Just a thought :blink:

 

Just tried it: If(ChorTime()>0.5,If(ChorTime()<1,ChorTime()*1000,0),0)

 

It works B)

You can leave the ",0"'s off as they seem to be optional and zero is the default.

Posted

From: "johnl" johnl3dx@excite.com

Date: 2004-4-29 23:41:46

 

as you suggested

I'm not an "Expression expert", but you might try nesting IF statements if(Chortime()>.5,if( Chortime()<1,Chortime()*1000{,0}))

thanks but get a syntax error..

johnl3d

 

_______________________________________________

Join Excite! - http://www.excite.com

The most personalized portal on the Web!

.

Posted

sorry for double post but found a way to sort of solve my example

 

 

If(Round(ChorTime(),1)=1,ChorTime()*1000){,0}))

 

but this is clumsy it now will return right value from .5 to 1.4 I think at least it starts and stops about there

 

still looking for other ideas

 

 

 

Haven't programed for awhile...getting to old for this... :blink::rolleyes:B)

Posted

Just tried it: If(ChorTime()>0.5,If(ChorTime()<1,ChorTime()*1000,0),0)

 

It works B)

You can leave the ",0"'s off as they seem to be optional and zero is the default. The {} specify optional.

Posted

You are right! thank you and anyone else reading this will thank you too

not sure what I did wrong when I tried it but you're answer I copied and pasted and It worked...

 

now where's the bow tie

Posted
a good looking female thom goes by and therefore his bowtie spins

You said you'd do it, and you did.

 

Now that you've got me interested in expresions, I found the functions (drop down from the expresion edit window), but where do I find the list of A:M values/variable (i.e. ChorTime()).

Posted

From: "johnl" johnl3dx@excite.com

Date: 2004-4-30 08:06:22

 

From: Ganthofer : Glenn Anthofer : help with condition statement< John,< Now that you've got me interested in expresions. I found the functions (drop down from the expresion edit window), but where do I find the list of A:M values/variable (i.e. ChoreTime()

I got most of my information which is rather limited to the propeller posting

and this tutorial

http://users.hol.gr/~sogou/animaster/expressions.htm

 

there is some stuff in the online tech reference too

 

 

Anyone else...?????

http://www.hash.com/htmlHelp/v10.5/Technical_Reference.htm

 

_______________________________________________

Join Excite! - http://www.excite.com

The most personalized portal on the Web!

.

Posted

I think I need new glasses :rolleyes:

Didn't notice that ChorTime() was in the drop down function list. It looks like getworldpos, GetTime and ChorTime are the only access to internal variables.

 

Thanks

Posted

I do not have AM yet, but I am a programmer. (no I don't play one on tv)

 

Your code:

if (Chortime() >.5 and Chortime()<1,Chortime()*1000{,0})

 

 

Looks to me like it should be:

if (Chortime() >.5 && Chortime()<1,Chortime()*1000{,0})

 

or

if (Chortime() >.5 And Chortime()<1,Chortime()*1000{,0})

 

Note the upper case A.

 

And a tip on getting a responce to code snippits.

Always include the syntax error message.

 

Just trying to help.

Jack

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...