# SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

 Register FAQ Members List Calendar Mark Forums Read

 02-03-2005, 07:45 PM #1 Neo-MatrixX Registered User     Join Date: Feb 2004 Posts: 26 Thanks: 0 Thanked 0 Times in 0 Posts Mel help Hello, I'm trying to create a number of cones randomly on the ground using mel. so far i have the following, but cant figure out how to get the cones on the ground. vector \$rand; for (\$i = 0;\$i<20;\$i++) { \$rand = sphrand(10); cone -p (\$rand.x) (\$rand.y) (\$rand.z); } If anyone could, it would be greatly appreciated
 02-03-2005, 07:59 PM #2 kbrown Moderator     Join Date: Sep 2002 Location: London, UK Posts: 3,198 Thanks: 0 Thanked 8 Times in 8 Posts What exactly is your ground? __________________ Kari - My Website - My IMDB Do a lot, Fail a lot and Learn a lot!
 02-03-2005, 08:02 PM #3 Neo-MatrixX Registered User     Join Date: Feb 2004 Posts: 26 Thanks: 0 Thanked 0 Times in 0 Posts It can be any flat surface like a polygon plane.
 02-03-2005, 08:11 PM #4 LauriePriest Moderator     Join Date: May 2003 Location: London Posts: 1,001 Thanks: 0 Thanked 59 Times in 51 Posts you have a random value on the y axis, would that make it so that they would go anywhere rather than stay on one plane?
 02-03-2005, 08:26 PM #5 Neo-MatrixX Registered User     Join Date: Feb 2004 Posts: 26 Thanks: 0 Thanked 0 Times in 0 Posts Yeah feel free to change the coding in anyway, as long as the cones are placed randomly on a flat surface thanx
 11-03-2005, 01:53 PM #6 Alan Moderator     Join Date: Oct 2002 Location: London, UK Posts: 2,800 Thanks: 0 Thanked 5 Times in 5 Posts float \$xpos; float \$ypos; float \$zpos; for (\$i = 0;\$i<20;\$i++) { \$xpos = rand(-10, 10); \$ypos = 0; \$zpos = rand(-10, 10); cone -p \$xpos \$ypos \$zpos; } that's what i'd do. You could make it "clever" by making take the size of the surface into account but I don't have time to write that atm. Alan __________________ Technical Director - Framestore Currently working on: Your Highness IMDB

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off

 Similar Threads Thread Thread Starter Forum Replies Last Post MEL headache! happymat27 Members Lounge 5 05-12-2010 08:43 AM MEL headache!! happymat27 Mel Scripts & Programming 1 03-12-2010 03:41 PM

## \$34

Month-to-month billing

## \$87

Billing every 3 months
 \$29/month Unlimited access to all videos Project files to download Easy to cancel at anytime Save \$5 per month or \$15 in total compared to monthly billing with this package.

## \$288

Billing every 12 months
 \$24/month Unlimited access to all videos Project files to download Easy to cancel at anytime Save \$10 per month or \$120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.