The issue Im facing is that the Tank object ignores any rows that have a plant in the last column. It'll automatically spawn in the available rows, if there isnt one, it crashes the game. I never told it to do that tho. All zombies share obj_zombie_parent, and plants share obj_plant_parent. tank works fine spawning on top of other zombies even without a parent... just not plants
I'm making a PVZ game too! But it seems that yours will be better than mine. Anyway i'm using a very different proccess. Since i'm not a pro, i make an instance for each row, example: ObjZom_NormalP1 after that, he only walks in the first top horizontal row. So any other bullets from another row won't hit him. Yes, this is a very slow proccess. If you want to, i can help you with some of PVZ scripts (i do not use D&D's srry )
Mine has been coming along nicely. Until this crash appeared. my positioning system is simply to move_snap randomly. Its worked excellent so far. Sorry for my code BTW.. I rewrite alot and leave stuff there. Im also very novice so i over complicate things. Hey, Silver Scratch, want to swap executables?
Run it each step, but clear it. Also change global.one through global.five into global.zombies and then make it an array with five indices (global.zombies through global.zombies). You can use a FOR loop to cycle through the rows
Run this in a controller object or whatever At the very start of its step event. this will clear out global.zombies each stpe so each step you know how many zombies there currently are. Then it will ask each zombie what row it is on and increase the proper index of global.zombies. You then check what you want. Then at the start of the next step, everything starts over.
I put it in my obj_control step event, and it works partially.. I was watching global variables, and it counts the number of zombies in row one (y=69) as "zombies" but doesnt count any others