Mr Awesome
Member
Thanks to previous help I have a grid of 24 circles each with a num variable of 1-24. I want to create various patterns using objects in these circles, which I can do with a single object:
But if I change the last line to create one of two objects using choose
the positions of the objects get messed up. Obviously I'm using the wrong function or using choose incorrectly. If anyone can point out the flaw(s) in my code I'd really appreciate it.
Additionally, is there a way to select a range of numbers using : (for example, num 1 to 7) or would I have to use an array or list?[/ICODE]
GML:
with obj_circle{//Square
if num==1 or num==2 or num==3 or num==4 or
num==5 or num==6 or num==7 or num==13 or
num==12 or num==18 or num==19 or num==20 or
num==21 or num==22 or num==23 or num==24 {
instance_create_layer(x+6,y+6,"text",obj_pig_head)}
instance_create_layer(x+6,y+6,"text",choose(obj_pig_head,obj_bomb))}
the positions of the objects get messed up. Obviously I'm using the wrong function or using choose incorrectly. If anyone can point out the flaw(s) in my code I'd really appreciate it.
Additionally, is there a way to select a range of numbers using : (for example, num 1 to 7) or would I have to use an array or list?[/ICODE]
Last edited: