E
Eugene Shepherd
Guest
Little backstory:
I have an idea to make enemy spawner - box, which gonna identify where to place the 'enemy' on the floor.
It is an object that I can see in room editor, so I can stretch it and thus its code will allow to register all the floor it touches and make a random desicion, where to place enemy by the width of itself.
So I have another object, that will, as I think, choose, what spawner will activate at a time, because if I write a code to spawn an enemy to the spawner it basically will make every spawner in room create its own enemy at once (on every floor I place it).
Question:
How do I refer to one object from many objects of the same type? Also how to make it that I refer to the object in view, on screen, so it won`t do anything on the other side of the room, out of sight?
Lastly, if it is possible, do anybody have a code to spawn enemies? I haven`t done it before, so I can`t understand the basics behind it.
I have an idea to make enemy spawner - box, which gonna identify where to place the 'enemy' on the floor.
It is an object that I can see in room editor, so I can stretch it and thus its code will allow to register all the floor it touches and make a random desicion, where to place enemy by the width of itself.
So I have another object, that will, as I think, choose, what spawner will activate at a time, because if I write a code to spawn an enemy to the spawner it basically will make every spawner in room create its own enemy at once (on every floor I place it).
Question:
How do I refer to one object from many objects of the same type? Also how to make it that I refer to the object in view, on screen, so it won`t do anything on the other side of the room, out of sight?
Lastly, if it is possible, do anybody have a code to spawn enemies? I haven`t done it before, so I can`t understand the basics behind it.