Results 1 to 3 of 3

Vehicles which can garrison infantry

  1. #1

    Vehicles which can garrison infantry

    How can I make tanks capable to garrison a specific infantry squad and have tank commanders/mg gunners pop out of the hatch?
    And how to make it so that say, when squad "tank crew" exits their tank, the tank they exit becomes neutral and unnactive unless they garrison it which will then become your tank?
    I would also like to know how to make that specific squad spawn in their vehicle automatically when they finish building too.
    Also just to confirm, if I want that squad "tank crew" to gain vet to apply should I just copy the cw command tank vet onto the infantry squad?
    Any help is greatly appreciated.

  2. #2
    Member TheVole's Avatar
    Join Date
    Jun 2010
    Location
    Places You Should Not Know
    Search button + How to section = awnser

  3. Company of Heroes Senior Member  #3
    Moderator Lethal Dosage's Avatar
    Join Date
    Sep 2007
    Location
    In the back of my mind.
    In short, what you want to do is give the tank the hold_ext of a vehicle, set the num_squad_slots to 1 (to hold 1 squad) and num_slots the size of the squad you want to garrison (i'm assuming also 1, so it'll only hold a 1 man squad).

    go into the hold_ext's acceptable_types table, and add a new type. Maybe call it type_holdable\hold_tank commander.lua
    Then go into attrib/type_holdable folder, and copy one of the rgd files and rename it to hold_tank commander.rgd

    After that, go into the sbps file of the squad you want to garrison the tank, go into the squad_holdable_ext, and set the hold_type to hold_tank commander.lua
    Note: This unit will then only be able to garrison those vehicles setup for it, no other vehicles of buildings. You would have to add the new hold_type to EVERY vehicle and building (including ambient buildings) for the infantry squad to be able to enter them.

    Now that that is set up, you'd copy all the on_loaded_hold_actions from the M3 Halftrack, those being the slot_item_apply, apply_crew_action, and apply_modifiers_action.
    You'd adjust the slot_item_apply to point to the machinegun slot_item the vehicle is usually upgraded with (or remove this action completely if going for the tank commander), the apply_crew_action should be set to Gunner (but if you wanted it to be the tank_commander, you would change it to that). Finally, in the apply_modifiers_action, change the enable_weapon_modifier to point to the hardpoint that the vehicle has it's roof MG in (once again, remove this action completely if going for the tank commander).

    And that should be that.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •