Ideas for Hour of Code


#1

Hi folks, I’m working on building a project for Hour of Code week coming up. I’d like to create some sort of procedural programming that results in a generated snowflake. I started with the following.

  1. Create a very primitive shape
  2. Name for us in Co-Blocks (1)
  3. Duplicate named object
  4. Rotate first named project (30 degrees)
  5. Rename first project (1 into 2) to be looped into into creating a full circle (12 loops in this case - 360/30 degrees each).

This is where I am stuck because I can’t call named “2” unless I’ve named it before my code has run.

Any ideas how to get around this or an existing similar project?

Best,
Clint


#2

Hi @Clint_Carlson ,

If you’re wanting spawn objects ad nauseum, you can do this by feeding a “Create copy of Object” block as a parameter to an Object Factory Function.

See https://cospac.es/PL5j for example code.

Is that what you had in mind?

Cheers,

Geoff @ TechLeap


#3

Very helpful! Thank you Geoff!