Help please. I need to create these different colour cubes on small cubes and there shouldn’t be two and more colour cubes on one small cube.
What code have you got so far? Because from you screen shots, it looks like it’s working. Or is the second one what you’d like to have happen?
i need code to create these all objects on small cubes. I just put it myself to show you what i need.
Make each of the smaller PurpleCube objects have an instance variable called “color” that has a default empty string value.
Make the ColoredCube objects have an instance variable “color” with a default value of the color that it is.
Make the ColoredCube objects have the draggable behavior.
If a ColoredCube is in collsion with a PurpleCube and PurbleCube.VariableString(color) != ColoredCube.VariableString(color) then move the ColoredCube onto the PurpleCube and disable the draggable behavior, then Spawn a new ColoredCube in the selection row for that color.