Jump to content

turn pop wind activation on/off based on frame number

Recommended Posts


I'm trying to turn a pop wind object on/off. I first tried to just keyframe it, but then I get smooth values between 0 and 1 and all i want is on and off. 

I then noticed there is a handy 'use VEXpressions' box in there. but I do not know how to access 'Activation'.

The editor does not like Activate, Active, Activation, with or without an @ Symbol. The SideFX help pages seem to indicate this is possible, but without showing how to do it.



This is what I tired:

if(@Frame == 1 || 20) {
@Activate = 1;


if(@Frame == 10 || 30) {
@Activate = 0;




Link to comment
Share on other sites


You can type your expression  straight into the activation parameter, the activation value will be 1 if the condition you put is true and 0 if it's false. For example the expression below will result in the wind being activated for the first 30 frames only ^_^



  • Like 1
Link to comment
Share on other sites

When dealing with "use VEXpressions" boxes, the node will expect the name of the parameter, not the label, without an @. 

In your case this would be 

if(@Frame == 1 || 20) {	activate = 1; }

To find out the name of a parameter, you just hover over the label and it'll say "Parameter: name_of_the_parameter"

  • Like 1
Link to comment
Share on other sites

thanks Ziyad, I thought of doing this but abandoned it because I wasn't sure if I could have a more complex logic statement in there for turning it on/off. I guess it would work if I just wanted it to be turned on at a certain frame. Or can you put more complex statements (like something with curly braces) in a box like that? I will try it sometime and see.

dleonhardt - I thought I had already tried this, but sure enough, I type it out once again as you have indicated here, and it works! 

I didn't know about finding those parameters by hovering over the label, but I did stumble upon 'activate' as the name (which I why I thought I had tried it) by peering inside the Edit Parameter Interface.

but that is a good tip to remember, much faster than opening up the interface. 

Now I'm wondering if it is possible to access the wind X velocity with windx (like windx = 10)  I'm trying it now - no errors, but its not procing results either. It could be due to some other setting like amplitude or gravity, etc.

thank you both for the excellent suggestions and speedy responses

Link to comment
Share on other sites

Join the conversation

You can post now and register later. 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.

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...