Results 1 to 31 of 31

How can I make a vehicle spawn with passengers already in it?

  1. #1
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland

    How can I make a vehicle spawn with passengers already in it?

    So ya, I basicly want, for example, a M3 Halftrack to spawn with a squad already in it. Is this possible? I also had another problem with that when a squad left the object, they couldn't enter it anymore, how can i fix this? Maybe because it becomes neutral, but you can reenter normal buildings when you leave them, so what am I doing wrong?

  2. Modding Senior Member Company of Heroes Senior Member  #2
    Celéstial by heart Celution's Avatar
    Join Date
    Apr 2008
    Location
    Sweden
    Let me guess, you want your tanks to come with a tank crew, which then leave the tank when you turn it neutral on destruction (with your new tank destruction system), and want them to be able to recapture the tank once it's left behind?

    It would be much easier to know what exactly you are doing instead of making up an unclear story..


    Yes, you can spawn a squad inside the tank, you'll have to work with an upgrade in the squad_upgrade_apply_ext, which uses an action called "garrison_squad_action" to spawn the squad on creation of the vehicle. Make sure the vehicle has a working hold_ext and such though.
    I actually am not sure where it is set if a neutral thing can be garissoned or not, but my guess would be that if the hold_ext is setup properly it should work..

  3. #3
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by Celéstial View Post
    Let me guess, you want your tanks to come with a tank crew, which then leave the tank when you turn it neutral on destruction (with your new tank destruction system), and want them to be able to recapture the tank once it's left behind?

    It would be much easier to know what exactly you are doing instead of making up an unclear story..


    Yes, you can spawn a squad inside the tank, you'll have to work with an upgrade in the squad_upgrade_apply_ext, which uses an action called "garrison_squad_action" to spawn the squad on creation of the vehicle. Make sure the vehicle has a working hold_ext and such though.
    I actually am not sure where it is set if a neutral thing can be garissoned or not, but my guess would be that if the hold_ext is setup properly it should work..
    How is it unclear? I just want a squad already spawned in a vehicle, I don't see how that doesn't explain what I am trying to do here. Btw they actually leave when you command them to, wich might not actually be very accurate.
    Thanks though. :3

    ----------

    Also, another small question, how can I make a crew member die when a certain critical.. erm.. "happens"?

  4. #4
    Member Jaktbitter's Avatar
    Join Date
    Aug 2009
    Location
    The Netherlands
    You, want crew/squads that are in a vehicle to able to be killed? I do not think that has ever been attempted before and I doubt it is possible but than again I'm more of an Infantry type gut I do not know that much about vehicle coding.

  5. #5
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    I want a crew/squad to be killed when a certain critical happens.

  6. Modding Senior Member Company of Heroes Senior Member  #6
    Celéstial by heart Celution's Avatar
    Join Date
    Apr 2008
    Location
    Sweden
    I haven't tried this but you can try this:

    Go to the critical file and add a critical_action called occupant_damage.rgd. Set both booleans to true, I am not sure what max is for, but you'll have to play with it if it doesn't work. In the subactions you can then add a critical action called make_dead which should kill the occupant.

    Did you sort out how to spawn a squad inside the vehicle?

  7. #7
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by Celéstial View Post
    I haven't tried this but you can try this:

    Go to the critical file and add a critical_action called occupant_damage.rgd. Set both booleans to true, I am not sure what max is for, but you'll have to play with it if it doesn't work. In the subactions you can then add a critical action called make_dead which should kill the occupant.

    Did you sort out how to spawn a squad inside the vehicle?
    I did, it is working, but because the vehicle spawns neutral, they just spawn next to it instead of in it. :V And yeah, I found this action yesterday too, I'll just switch the vehicle back to ally then.

  8. Modding Senior Member Company of Heroes Senior Member  #8
    Celéstial by heart Celution's Avatar
    Join Date
    Apr 2008
    Location
    Sweden
    What exactly makes you want the vehicle to be neutral on spawn?

  9. #9
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by Celéstial View Post
    What exactly makes you want the vehicle to be neutral on spawn?
    Well, I wanted that if a crew enters the vehicle would become that teams vehicle if you know what I mean, like buildings. So I made them neutral on spawn, but yea, apparently they can't get into neutral stuff. Or maybe I'm just doing something wrong in the hold_ext.

  10. Modding Senior Member Company of Heroes Senior Member  #10
    Celéstial by heart Celution's Avatar
    Join Date
    Apr 2008
    Location
    Sweden
    What you can do is make it first owned, but then set revert_ownership to true in the hold_ext. If I recall correctly this should make the tank neutral when the loaded infantry exit the vehicle.

  11. #11
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by Celéstial View Post
    What you can do is make it first owned, but then set revert_ownership to true in the hold_ext. If I recall correctly this should make the tank neutral when the loaded infantry exit the vehicle.
    I did that before I made it spawn neutral, but then they can't enter the tank again when it's safe.

  12. #12
    you can revert the vehicle back to your control when you repair it.

  13. #13
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    @Isiar: I just tried it, I can't repair it because it's neutral.

    @Celestial: For some reason I'm still able to control the thing after the crew bails out. It does have a white circle around it but I can still select it and control it.

  14. #14
    you have to change the repair ability target info.

  15. #15
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by isiar View Post
    you have to change the repair ability target info.
    Ah, right.

    ----------

    Still doesn't work.

    ----------

    You know what, I just thought of this to solve this problem with my "Disabled" critical. I wanted it to count as a death so I could get it's manpower and EXP (In my mod you get resources back depending on how much the unit costs) But nobody could\wanted to tell me. So if someone knows how to do this, it would be fine too.

  16. #16
    Still doesn't work.
    do you have the "change ownership" in the repair ability start target action?

    the vehicle is still "alive" when you change ownership, just not in your control.

  17. #17
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by isiar View Post
    do you have the "change ownership" in the repair ability start target action?

    the vehicle is still "alive" when you change ownership, just not in your control.
    Oh. Oops.

    ----------

    Also, is it possible to make the vehicle's turret unmovable when the crew bails?

  18. #18
    enable weapon modifier (hardpoint 01,02,03).

  19. #19
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by isiar View Post
    enable weapon modifier (hardpoint 01,02,03).
    Yea, I know what action to use, but I'm asking where to put it so it happens when the crew bails.

  20. #20
    do you use a critical for that, or just unload the vehicle?

  21. #21
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by isiar View Post
    do you use a critical for that, or just unload the vehicle?
    No, just for unloading.

  22. #22
    disable the weapon in the modifiers_apply_ext, and enable it in "on_loaded_hold_actions".
    Last edited by isiar; 16th May 12 at 12:31 AM.

  23. #23
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Thanks mate.

    1 More thing: When a certain critical happens, I want the unit to sort of "Die". because in my mod the resources the unit costed come back when they get killed, and so forth. But that doesn't happen when i just change the ownership. How can I make this critical sort of count as a death.

  24. #24
    it can't count "dead" by changing ownership, but in the critical you use to cause the ownership change, you can use the action "modify resource".

  25. #25
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by isiar View Post
    it can't count "dead" by changing ownership, but in the critical you use to cause the ownership change, you can use the action "modify resource".
    I'm not sure if you understood me wrong, but the "Give back resources" Thing is already setup, the problem is that the unit has to die in order for me to get it back, and i don't know how to make it die without putting the make_wreck_action in there (I don't want it to explode)

  26. #26
    I understand you have the "disable" critical to make vehicles empty, in that critical add the action "modify resource" to give the player any resources you want.

    btw, you can enter your infantry to neutral vehicles by adding "site_ext" to the vehicle ebps, you can try it but it's not recommended (cause some icons problems).

  27. #27
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by isiar View Post
    I understand you have the "disable" critical to make vehicles empty, in that critical add the action "modify resource" to give the player any resources you want.

    btw, you can enter your infantry to neutral vehicles by adding "site_ext" to the vehicle ebps, you can try it but it's not recommended (cause some icons problems).
    I have a modifier in every units EBPS that gives back resources when they die, it's all setup already, I only need it to die without exploding. :]

    I'll see if the site_ext thing works.

  28. #28
    I've created static vehicles in the past ( for ZombieMod) to be able to be loaded or unloaded by any team or player, depending on who loads the vehicle it becomes theres and once unloaded becomes neautral again for the opposition or team player to take control if they want. Along with the .rgd editing still needed in areas of the ebps and sbps of the vehicle, the easiest way to overcome one problem that kept occuring was to add 1 simple script with it as well. So if you still havent overcome some of the issues that occur with this setup, as I had similar problems at the time ( like your finding out atm) I can write up a quick How-To for it along with the script needed for 1 specific problem it fixes.

  29. #29
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by sirpsychoj View Post
    I've created static vehicles in the past ( for ZombieMod) to be able to be loaded or unloaded by any team or player, depending on who loads the vehicle it becomes theres and once unloaded becomes neautral again for the opposition or team player to take control if they want. Along with the .rgd editing still needed in areas of the ebps and sbps of the vehicle, the easiest way to overcome one problem that kept occuring was to add 1 simple script with it as well. So if you still havent overcome some of the issues that occur with this setup, as I had similar problems at the time ( like your finding out atm) I can write up a quick How-To for it along with the script needed for 1 specific problem it fixes.
    Nah, nevermind about this. This can't be done in my mod because the AI doesn't know how to handle it. I'm now wondering on how to get a certain critical to kill vehicles without actually making them explode. :V

  30. #30
    only the explosion, or you don't want it become wreck?

  31. #31
    Member Zupadupadude's Avatar
    Join Date
    Apr 2011
    Location
    Holland
    Quote Originally Posted by isiar View Post
    only the explosion, or you don't want it become wreck?
    I don't want it to become a wreck and I also don't want the explosion.

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
  •