Soldiers how to make them?

Hello. i was wondering how to make a soldier.

U know like a strategy game. u can greate him from a building and then his just there…

If u can help me how to make a soldier from a building please answer

Thanks anyway :slight_smile:

The game engine won’t magically make a soldier for you. You have to model the building and the soldier, and figure out how to use python to make him spawn from the building.

No, you just need to select the barracks then click the create soldier button and it is there… :wink: just joking.

It is like ErwinH says, you have to create the building, the environment, the characters first. Then you apply logic to it, to act within the game.

To “create” a new instance of an object use the addObject actuator. Keep in mind, the object template (the origin) must be at an hidden layer.
Python is not necessary but for an strategy game highly recommended.

I know this is stupid but: where is this addobject in this actuator?

my ass has come off from laughing (MAHCOFL):stuck_out_tongue:

I recommend that you watch some video tuts on blender 2.5 and read some docs on blender 2.5 and python and the BGE before you go diving into making a game ;D

Ive been watching about 100 hundred, but i cant find anything in videos…

well I doubt you’ll find a video tutorial on making a barracks system for an RTS style game in blender thats why I said watch vids on blender 2.5, as in blender in general, learn how to use a gun before trying to wave it around in public… wait im I still talking about a gun… ummm yes! :stuck_out_tongue:

That kind of game is not the easiest game to create in blender. You might want to make some starter games before you jump into it with an RTS, especially if you don’t have a knowledge of code. Try making a pinball machine, and a 2 or 3D platformer first, then come back to this, or you will surly get discouraged. That’s my advice, because I got discouraged early on trying to over due my first game.

AddObject is a mode of the Edit Object actuator.
When activated this actuator creates a copy of the referenced object, at the position of the actuators owner (GameObject).
In your case, this could be an empty near your barracks object (to avoid collision problems).

The question you need to answer to yourself is: When should a new soldier be created?