Squashing those pesky instances
gyroscope
I am here.Member, Sous Chef, PRO Posts: 6,598
Hi, in quite a few levels of my game, I'll have at least 20 or more "baddies" which can't harm the player, each level (there are quite a few others that can, of course). Easy points are made by letting the player run over them, then with a squishing sound, 10 points are added to the score, then they fade and are destroyed.
I made the generic rules in the prototype, then made each one of the 20 in the first level a different name (well, same name but with 01, 02, etc.) after making them instances. Then added an attribute to each, i.e Plant01Alive, Plant02Alive, etc. Then finally changing the Rules where these occur.
It's a bit tedious having had to do this for 20 or so instances, and this is just for the first level. If i'm to have at least 20 levels, that's 400 or more times this'll have to be done.
So my question is: am I going about this the correct way? Or is there a simpler and more straightforward way I should be using?
Any help appreciated, thanks.
:-)
I made the generic rules in the prototype, then made each one of the 20 in the first level a different name (well, same name but with 01, 02, etc.) after making them instances. Then added an attribute to each, i.e Plant01Alive, Plant02Alive, etc. Then finally changing the Rules where these occur.
It's a bit tedious having had to do this for 20 or so instances, and this is just for the first level. If i'm to have at least 20 levels, that's 400 or more times this'll have to be done.
So my question is: am I going about this the correct way? Or is there a simpler and more straightforward way I should be using?
Any help appreciated, thanks.
:-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
Comments
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps