One monster in the blend file --> ten monsters at runtime?

Hey. I have this game I’m working on, in Blender. When it’s done, I’m gonna save it as an exe.

I currently have one meshed, UV’ed, and rigged monster in my game. When the player plays the game, I want him to be able to fight ten copies of this enemy, either all at once, or perhaps in waves.

I would rather not copy and paste the entire monster, because then my exe’s final file size will be way too big. Is there any way to spawn clones of this monster at runtime?

I’m not neccessarily hoping for mobs as big as, say, Serious Sam, but four or five active enemies at once would be nice.

Ideally, I’d like to be able to spawn other objects, too, such as collectible item, projectiles, debris, etc. Just please walk me through the general process of making stuff appear at runtime. Either by cloning stuff already in the current blend file, or by loading external blend files and treating them as an object. Whichever’s easiest. Whatever works.

(I know a little bit about how to use the Blender Game Engine, and I know how to load and edit python scripts in the text editor and plug the python script into a logic brick. Anything else, you might need to explicitly tell me how to do…)

Thanks in advance for any helpful replies. :slight_smile:

In general you can share meshes if you copy objects with <Alt>-D. That saves the second mesh. If you already have the object you can change the mesh in the editing buttons by selecting an existing mesh.

In the game itself you can use the EditObject actuator with Add Object. Make sure the object to be added is in an invisible layer.

Using the [edit object -> add object actuator], would be one way that you can spawn anything in place of an empty.

The initial object to be spawned should be on layer 2, and the empty to which the add object actuator will be connected to should be on layer 1 (where the game/enviroment is).

Thanks, Monster. :slight_smile:

If they’re in an invisible layer, they won’t collide or run their game code either, right? I don’t want to waste cycles on my prototypes. :wink:

Object in invisible layers don’t run game code (or technically exist). They start running game code when they are AddObject’d to the active layer.