Question on tank models and attachto + origins


(SteelRat) #1

I am playing around trying to get a tank to work, first I did was copy the tank stuff from Goldrush into a new map to play with it. When I start the map the tank is there as it should but it is impossible to repair or steal it and I am clueless why this is the case since all triggers and that are there.

Then I thought I would start from scatch to learn properly, I added the Jagdtiger and the turret and the tracks, this caused the tracks to be above the tank to my own emusement :slight_smile:

I am trying to get a grip on how ā€œattachtotag worksā€ and what the dependencies are, I have tried this about 15 times today and I still end up with the tracks above the tank

Does anybody have the skills to explain how to assble the tank properly?

I did read the LDR and there is a lot of good things in there but it does not reveal how you control the X,Y.Z position of the tank clips.

I think the lacking of a good tutorial on this subject is harming the mapping community, most of the good maps have moving objectives and there not many of them compared to static obj maps.

I did try Chrukers tutorial as well, although it has a few flaws as well as using the wrong tank model since I would Like to use the Jagdpanther. (ref link: http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=8280)

Anybody have any good info to share?

Cheers,
SteelRat


(Mean Mr. Mustard) #2

I believe the entity that is being attached to a tag, is attached to the tag through it’s own origin (for the truck, there is a tag - tag_wback - that is at the center of the truck thru the rear axle, the wheel model is then attached to this point --( two wheel are in the model and the orgin is in the center).

First, are you attaching the tracks to the correct tag? And if you have a typo in the tag (or a tag doesn’t exist in the model), it seems to place the attached model’s orgin at the origin of the attachto model (if that makes sense…)


(SteelRat) #3

I am probably not connecting to the right tag.
How are you supposed to know what tag to use for the different parts?

I also found this post on the topic, but I still don’t understand how you figure out what tag to conect to :stuck_out_tongue:
http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=3507

EDIT: After reviewing the goldrush script again I realised those are the tags used for the jagdpanther:
attachtotag tank_shell to tag_turret
attachtotag tag tag_tank
attachtotag tank_turret tag_flash
attachtotag tank_shell tag_smoke

So if I connect my tank_tracks to tag_turret (like I have been doing) the tracks will fly.
I’ll play around with this some more…


(Mean Mr. Mustard) #4

You could import the md3 into gmax and find the correct tag…but it’s probably easier and quicker just to mod the script ā€˜attacthtotag’ line


(Chruker) #5

To assemble the Jagdpanther correctly start with the jagdpanther_africa_tracks.md3 as model2 in the script_mover

Now the rest of the model are:

  • jagdpanther_africa_body.md3 is attached to the tag ā€˜tag_tank’ from the _tracks.md3 model
  • jagdpanther_africa_turret.md3 is attached to the tag ā€˜tag_turret’ from the _body.md3 model

A smoke entity can be attached to the tag ā€˜tag_smoke’ from the _body.md3 model


(Chruker) #6

I did try Chrukers tutorial as well, although it has a few flaws as well as using the wrong tank model since I would Like to use the Jagdpanther.

I’m interrested in knowing what you mean by flaws. Is it the problem thats discussed in the topic I started?

If not, have you found another bug?

I’m interrested in knowing :slight_smile:


(No1_sonuk) #7

The problem with the jagdpanther is that the gun and turret are the same model. That’s probably what’s causing the confusion.

So if I connect my tank_tracks to tag_turret (like I have been doing) the tracks will fly.

Yup, that’s because the tracks aren’t supposed to be connected to the ā€œturretā€, there’s supposed to be a body in between.


(SteelRat) #8

When using the browning in the churchill of your prefab the mounted gun keeps shooting at the spot where the player entered the tank, it does not move along with the rest of the tank.


(No1_sonuk) #9

I think that if you want a mounted gun, the model to which it attaches is not a part of the script_mover.
IIRC, the Jagdpanther in Goldrush has the tank shell clip brushes as the mover with ā€œtagent tank_shellā€, and a separate misc_gamemodel ā€œscriptname tank_shellā€ with the tank hull model.
In the script, tank_shell is "attachtotag"ed to the script_mover.


(Chruker) #10

No1_sonuk >> You are correct about the MG and Jagdpanther

SteelRat >> It sounds very strange. Can you make a screenshot of it?


(SteelRat) #11

Chruker, mistake was not yours it was mine :stuck_out_tongue:
Forget about it :slight_smile: