Double Tank Help Needed
by J L · in Combat Starter Kit · 05/05/2009 (11:59 am) · 11 replies
Okay so I have tried everything , I tried grouping the tank with the red an blue base like in the default mission but yet no luck. If I delete the extra crap that is put in, the tank gets deleted also. Anyone else have this problem or is it just that I am a new-bert ?


About the author
#2
05/06/2009 (7:14 am)
I dropped a tank in and when I did that it dropped another tank without the main gun and tracks
#3
There are two images for the tank. One has the tracks and turret, the other is the base. When the mission loads, it connects the two via script calls.
I'd suggest taking a look at the demo mission file to see how they added them in. There may also be a section in the world creator that will add them both in the appropriate places. Check the pre-made section, where they have red base/blue base. If that doesn't help, let me know and I can give you better instructions once I get to my dev machine.
05/06/2009 (9:16 am)
It's been a while since I've played with this, but I'm pretty sure you are dropping in the wrong tank image. There are two images for the tank. One has the tracks and turret, the other is the base. When the mission loads, it connects the two via script calls.
I'd suggest taking a look at the demo mission file to see how they added them in. There may also be a section in the world creator that will add them both in the appropriate places. Check the pre-made section, where they have red base/blue base. If that doesn't help, let me know and I can give you better instructions once I get to my dev machine.
#4
06/24/2009 (9:05 pm)
Just delete the secondary images from the zone. Its doing the same thing here.
#5
when you go to add the tank to your mission file there are TWO tank-like entries listed. TankBody and Tank01.
Make sure you use Tank01 when adding new tanks to the mission.
if that doesnt solve your problem - please explain more on what you are trying to do
07/22/2009 (7:24 pm)
@foodstampwhen you go to add the tank to your mission file there are TWO tank-like entries listed. TankBody and Tank01.
Make sure you use Tank01 when adding new tanks to the mission.
if that doesnt solve your problem - please explain more on what you are trying to do
#6
07/24/2009 (10:47 am)
Well, I use Tank01 and what happens is it drops down 2 tanks one tank is complete and does not fire, the other is just the body and turret, I will see if I can make a video
#7
07/25/2009 (3:57 am)
...run a trace(1); to find out the calling sequence, something is just...wrong. I would see that all the time with turrets. Add a vehicle with a turret, you get two; one just sits there. I could never get the 'barrel' datablock to be recognized by the turrets, had to manually jam the thing on.
#8
07/25/2009 (3:57 pm)
read the pdf instructions pal, you need in script the union of the 3 parts of the tanks, see the exaample scripts.
#9
I did it your way PAL and it still don't work so the next time you feel lucky ask yourself, Did I tell him a stupid thing or did I not tell him a stupid thing.
Bug in CSK as we been saying
07/28/2009 (8:59 am)
Quote:read the pdf instructions pal, you need in script the union of the 3 parts of the tanks, see the exaample scripts.
I did it your way PAL and it still don't work so the next time you feel lucky ask yourself, Did I tell him a stupid thing or did I not tell him a stupid thing.
Bug in CSK as we been saying
#10
When you place the tank01 shape, save, and reload, do both shapes still persist? It may be a bit of a workaround, but what happens when you add one by manually adding the object code to your mission file?
07/28/2009 (9:49 am)
There are lots of bugs in the CSK unfortunately, and the double tank issue seems to be rather random. I never really found a solution for it other than re-writing their vehicle hacks to a more logical and proper solution. We ended up dropping nearly every bit of their script and only using portions of the source code changes in our project.When you place the tank01 shape, save, and reload, do both shapes still persist? It may be a bit of a workaround, but what happens when you add one by manually adding the object code to your mission file?
new TankVehicle()
{
canSaveDynamicFields = "0";
position = "749.383 848.692 59.3871";
rotation = "-4.15698e-005 -0.0432941 0.999062 179.918";
scale = "1 1 1";
dataBlock = "Tank01";
disableMove = "0";
}; You would have to change the position and rotation depending on your mission.
#11
It could be there are issues in your creator code somewhere. Make sure everything is unmodified from the origional zip file you downloaded.
Then check server\scripts\Tank01.cs
starting on line 247 it should have the following:
function Tank01::create(%block)
{
%obj = new TankVehicle() {
dataBlock = %block;
};
return(%obj);
}
function Tank01::onAdd(%this,%obj)
{
Parent::onAdd(%this, %obj);
--- followed by a bunch of code to setup the tank. This is what actually does the setup. if you have changed this, or its missing then things wont work right.
And lastly - When you drop the tank into the mission, and then save your mission -- what gets added to the file? it should look like what Michael posted above
07/29/2009 (7:04 pm)
I remember finding & fixing this several times during development. you must use the Tank01 object off the mission editor, and the ::create and ::onAdd methods have to be correctly defined.It could be there are issues in your creator code somewhere. Make sure everything is unmodified from the origional zip file you downloaded.
Then check server\scripts\Tank01.cs
starting on line 247 it should have the following:
function Tank01::create(%block)
{
%obj = new TankVehicle() {
dataBlock = %block;
};
return(%obj);
}
function Tank01::onAdd(%this,%obj)
{
Parent::onAdd(%this, %obj);
--- followed by a bunch of code to setup the tank. This is what actually does the setup. if you have changed this, or its missing then things wont work right.
And lastly - When you drop the tank into the mission, and then save your mission -- what gets added to the file? it should look like what Michael posted above
Torque Owner ChrisG
It might be because I don't have the combat starter kit but you might need to clarify the question a bit.