Thanks for the quick reply. Unfortunately, i'm so clueless i still can't get it to work haha. This is what's happening: // global string { global string $placementHelper; int $vertexCount[] = `polyEvaluate -v $placementHelper`; print $vertexCount }; // Error: { // // Error: Syntax error // // Error: int $vertexCount[] =…
I really recommend you read the error it gives. If you have code that gives you source errors, look for the specific part raising that error. If you have a runtime error it's recommended to add a print("--Some debug message begin--\n") and print("--Some debug message end--\n") in your code and place the prints so you can…
Your error happens because you're having dragCommand on Pine, which is the same slider you're modifying. You want to have dragCommand on oak do you not? :) Currently: pineSlider -> dragCommand -> Modify Pine You want: oakSlider -> dragCommand -> Modify Pine
Derpderp! That certainly wasn't doing it any favours hahaha, but sadly hasn't solved it either! Still getting the same error. I'm not entirely sure what the drag command is meant to achieve though? Surely it's just change the pine slider to be a new value? Whereas i want to be able to set the maximum value, but the user…
you could just store the vertex positions that you have used something like //OUTSIDE OF FOR LOOP//float $vertexList[];//Inside FOR LOOP//$vertexList[size($vertexList)] = pPlane1.vtx[$randomNumber1]; Sucks that mel doesnt have push/pop or any array methods so this is a quick way to do a push. PS: I havent tested this, so…
int $vertCount[] = `polyEvaluate -v $placementHelper`; polyEvaluate returns an array so you need to make the variable an array. Also watch the closing of tilda's. That's why there's a syntax error and on another note, dont assume the mesh will be selected always, I know you're making it in the script etc. This is more of a…
Another day another load of issues. I'm getting "Error while parsing argument" on the dragcommand proc. I thought i was doing it right, the script runs, but whenever you move the slider the error while parsing is spammed in the editor and the value doesn't get restricted to below the remaining percentage. global proc…
well making it global doesnt make everything inside global. The global is there so you can call functions through the script editor. For something like that you need to look into arguments where you're basically passing data back and forth or doing setters and getters (cant remember if mel even supports it) Not sure where…
K so the reason is you're first missing the open and close brackets for the for loop. Second the move command wants the object name at the end. Otherwise the script will just error out. Here's the fixed up code: for( $i=0; $i<$density; $i++ ) { string $tree[] = `polyCube -name ("treeA"+$i)`; int $randomNumber1 = `rand…
Ah right, so you have to store the coords in a float array and then seperately call out each number stored in it. Gotcha! Thanks a ton for the working code. That part works now. While i was having trouble with that i started on the percentage sliders. I'm having trouble getting this to work: intSliderGrp -label "Oak…