Total Anihilation: Battlegrounds

Empties don’t have all the extra unnecessary data that a plane does. A plane has vertices and material and texture settings, which can increase filesize. Empties are just a bit more practical most of the time. The only time I would use a plane instead of an empty (actually, I would use a triangle or a single vertex, not a plane) is for vertex parenting.

One word of advice about empties, though: don’t scale them when you’re using them as spawn points for added objects. It will cause the added objects to be scaled by the same factor the empty is.

are there any scripts that will allow an empty to copy the location of an added object? That would be sooo much easier!:yes:

I’m sorry, this is pretty selfish:o-moving it to the top and all, but I REALLY need to know if I can do this…

are there any scripts that will allow an empty to copy the location of an added object? That would be sooo much easier!:yes:
If not I’ll have to re-design a lot of my ideas to compensate for this roadblock, and if I get stuck for too long I loose interest…

(I already know what “social” will say…" good! loose interest. then maybe you will stop wasting our time with this crap!) :D:D:D:D:D

What do you mean by copy the location? get the location? or put the empty at that locataction?
Well, I will try to use my begginer python knowledge to answer this one :smiley:

I’m guessing on all of this though so please correct me anyone!

import GameLogic

cont = GameLogic.getCurrentController()
owner = cont.getOwner()

place = getPosition(Cube)

owner.setPosition(place)

Now I really doubt this would work, and if it did, it should get the position of a object called “Cube” (I probably need to define getPosition some how :confused:), and then sets the empty location to the Cube’s position (as the empty would be running the script).

That’s close, face. You’ve just forgotten to get the cube from the global object list first, and a bit of your syntax is off.

cont = GameLogic.getCurrentController()
own = cont.getOwner()
cube = GameLogic.getCurrentScene().getObjectList()["OBCube"]

place = cube.getPosition()

own.setPosition(place)

However, there are some serious problems that come up when you’re trying to use this with an added object. I don’t think added objects have different names or anything, so if you had five cubes generated, the script would not know which one of the five you were talking about. To avoid that, run this script from the individual cube instead (the code face gave would be attached to the empty).

cont = GameLogic.getCurrentController()
own = cont.getOwner()
empty = GameLogic.getCurrentScene().getObjectList()["OBEmpty"]

place = own.getPosition()

empty.setPosition(place)

Just stick the script on the main cube in the hidden layer that is being used to add objects. Each cube will have its own copy of the script, and it will run whenever the trigger event happens. Also, be sure that only one cube is triggering the script at each frame, or the script will not work (that is, if two or more cubes ask for the empty at once, only one of them will actually get it).

(Note: The names “OBCube” and “OBEmpty” are assuming that your objects are named “Cube” and “Empty”. Replace them with the actual names of your objects.)

BTW, what are you trying to do? It would really help us to know that, because there might be an easier way than this. For example, you can put the empty in the hidden layer with the cube and parent it to the cube (make it the child of the cube, that is). When the cube is added, it will bring copies of its children with it. Or you could just make the cube add an empty at its current location when the trigger event occurs. (There are usually at least five different ways to do any one given thing in Blender.)

Ok. Here we go.this may get confusing…:spin:

I am planing on having only about16 bots on the map at once, and i need each of them to be able to track to each other. I plan on having 24 characters to select from, and the bots will select one randomly. Using one object that would change depending on the character selected would be confusing and difficult to do, but if i made each character added it would be a lot easier, as there would be a main object for each. Then came up the problem of added object tracking. So, if i gave each of the 16 their own empty, i could get the bots to track to the empties which fallow the added bots. but then there’s the problem of telling which empty to fallow which bot…:confused: GRRRR! why can’t things be easy!!!:mad:

EDIT: I think i got it! I will make * copys of each character and set a global value of 1-8 (BTW 16 bots-8 each side) when value is 1 and peewee is selected, add peewee A1, when vale is 2 and peewee selected, add peewee A2, and so on! it’s going to be a lot of logic brick work, but what needs to be done, needs to be done…

Total Annihilation? i remember a game named that.

http://www.geocities.com/totalannihilationdownloadcenter/tacd.jpg
http://www.msu.edu/~bonddenn/screenshots/ta.jpg

was an awsome game

Is there a script to put a cap on the frame rate? It usually runs at 35 fps, but sometimes fluxes to 70, causing a notable change for about 30 sec.

ah, but it may not madder if i can’t get this stupid NPC tracking to work…Without it there’s no game.

Link this script to always sensor (pulse mode off):

GameLogic.setLogicTicRate(30)
GameLogic.setPhysicsTicRate(30)

sorry guys. I’m gonna stop working on this for now. I’m a designer and artist, not a programmer. For now I’ll go back to working on Yacker: The ECHO Within. At least all i have left to do in that game is make levels.

:frowning: :frowning: :frowning:

Pls make the Krogoth! I love this game…I love arm and I hate core!

Don’t bump old threads please younguser. Next time please PM the original poster instead.