I would like to make a wind field in maya that randomly changes directions. I’ve begun by using a simple random number generator and one direction of wind, but it isn’t working. Here’s the code:
int $randomXDirection = rand(1, 2);
airField1.DirectionX = randomXDirection;
I get this error message:
// Error: Invalid use of Maya object “randomXDirection”.
Why am I getting this error? How do I fix this?