johnl3d Posted April 30, 2004 Posted April 30, 2004 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 ? Quote
Ganthofer Posted April 30, 2004 Posted April 30, 2004 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 Just tried it: If(ChorTime()>0.5,If(ChorTime()<1,ChorTime()*1000,0),0) It works You can leave the ",0"'s off as they seem to be optional and zero is the default. Quote
animaster Posted April 30, 2004 Posted April 30, 2004 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! . Quote
johnl3d Posted April 30, 2004 Author Posted April 30, 2004 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... Quote
Ganthofer Posted April 30, 2004 Posted April 30, 2004 Just tried it: If(ChorTime()>0.5,If(ChorTime()<1,ChorTime()*1000,0),0) It works You can leave the ",0"'s off as they seem to be optional and zero is the default. The {} specify optional. Quote
johnl3d Posted April 30, 2004 Author Posted April 30, 2004 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 Quote
johnl3d Posted April 30, 2004 Author Posted April 30, 2004 Bowtie idea very rough just to show it worked http://johnl.inform.net/pages/bowtie.htm forgive the walk cycle did it in 2 minutes... Quote
Ganthofer Posted April 30, 2004 Posted April 30, 2004 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()). Quote
animaster Posted April 30, 2004 Posted April 30, 2004 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! . Quote
Ganthofer Posted April 30, 2004 Posted April 30, 2004 I think I need new glasses 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 Quote
PlJack Posted April 30, 2004 Posted April 30, 2004 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 Quote
Recommended Posts
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.