JacktheBlindRabbit
Member
Hey,
Is there a way to affect all the variables/objects stored in an array?
I have read the GMS documentation and searched the forums but I have to admit I'm struggling to understand how to use arrays...
For example if i want to make something explode in multiple parts and affect theses parts, how should I do it?
In my mind it's something like this, but that doesn't work:
I know how to do this without arrays but that's a lot of code for nothing, so I'm asking to increase my workflow.
Thanks in advance!
Is there a way to affect all the variables/objects stored in an array?
I have read the GMS documentation and searched the forums but I have to admit I'm struggling to understand how to use arrays...
For example if i want to make something explode in multiple parts and affect theses parts, how should I do it?
In my mind it's something like this, but that doesn't work:
Code:
parts[1] = oHead
parts[2] = oBody
[...]
explosion = instance_create_layer(x,y,"layer",parts)
explosion.direction = ...
explosion.speed = ...
Thanks in advance!