Post by yahn on Apr 30, 2005 11:33:15 GMT -5
I'm looking more for ideas on how to do this than code on how to do this.
what would you do for spawning monsters in a game? Would you see how many mobs are in a certain distance from the spawn object and then if their arn't so many it sets an alarm and spawns one? are there any other ways to do this? I also thought of using an array. You would set a variable in the create event called max, and that would be the max amount of objects it can spawn then you would use a for loop i = 0; i < max; i += 1 then array = 0 then in the step event check to see if array = 0 if it does set an alarm then change array = instance_create(x,y,mob) then when an instance is destroyed it will check to see what spawned it and check to see the array that = its id and then set that back to 0. I think this would be a lot simpler with a ds_map or list or something else. suggest anything you think would work.
Also what would you do to tell you what part of the map your in? would you create a huge object that is the shape you want it and then use that to tell you where you are or would you do some kind of collision checking with a shape because I don't want it to be just in a circle or a square. I want it to be like actual boundaries. Would you make an object that lines the boundry and then swith the variable when you cross it? I read somewhere that you can use a ds_map to do this, but i don't see how you would. suggest anything you think would work for this also.
what would you do for spawning monsters in a game? Would you see how many mobs are in a certain distance from the spawn object and then if their arn't so many it sets an alarm and spawns one? are there any other ways to do this? I also thought of using an array. You would set a variable in the create event called max, and that would be the max amount of objects it can spawn then you would use a for loop i = 0; i < max; i += 1 then array = 0 then in the step event check to see if array = 0 if it does set an alarm then change array = instance_create(x,y,mob) then when an instance is destroyed it will check to see what spawned it and check to see the array that = its id and then set that back to 0. I think this would be a lot simpler with a ds_map or list or something else. suggest anything you think would work.
Also what would you do to tell you what part of the map your in? would you create a huge object that is the shape you want it and then use that to tell you where you are or would you do some kind of collision checking with a shape because I don't want it to be just in a circle or a square. I want it to be like actual boundaries. Would you make an object that lines the boundry and then swith the variable when you cross it? I read somewhere that you can use a ds_map to do this, but i don't see how you would. suggest anything you think would work for this also.