Is this possible with the current hooks?

Discussion in 'Mod Discussions' started by cptusmc, August 15, 2014.

  1. cptusmc

    cptusmc Active Member

    Messages:
    100
    Likes Received:
    52
    I had a conversation a few days ago with someone on the forums about creating an interplanetary multiunit transport through a mod. Also, as a preface, I understand about hooks vs hard-coded items, so no need to explain that. Here is what they said:

    Now, I have not immersed myself into this project but I wanted to know if a concept is possible with the current hooks. So, this quote sounds like people have been trying to make a unit transport like in Supreme Commander, where a player can see each units attached to their own individual socket, right?

    So, correct me if I am wrong but it sounds as if it is possible to create a transport which can carry multiple units only if they occupy the same socket. Therefore, isn’t it possible to create a transport where multiple units “go inside” it? Would an area command fill the ship with 1 socket that can allow 50 units?

    So I am asking if it is possible to have one socket holding 50 units (not 50 sockets holding 1 unit)?

    … I’m known to beat a dead horse, so in case you are still a bit fuzzy on the question, below is an example which may help.

    To better illustrate this image the transport placing down a “rally” point which is a location units will go to when the player instructs them to board the transport. This “rally” point effectively could act like a teleport; essentially “teleporting” the units inside the ship, effectively doing two things: 1) You do not see the units and 2) One socket is holding 50 units. When it is ready to unload at its destination, boom, the units appear. Is that possible?



    Since, this won’t be the prettiest thing, I was also wondering if it is possible to add a time delay on the rollout, which would make it look like each unit is rolling out individually? Or if it is possible to have units exit from multiple locations, like the left and right side of the transport at the same time?
  2. liquius

    liquius Well-Known Member

    Messages:
    731
    Likes Received:
    482
    You should be able to have a transport that can hold more then one unit. The problem you will run into would be loading and unloading. IIRC for each load/unload command your unit transport will only pick up/drop off one unit per command. You also won't be able to tell how many units your transport has loaded.
    squishypon3 likes this.
  3. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    The Statera mod has already experimented (possibly implemented?) a transport like this. Their main issue is it doesn't work with area commands at the moment- so you have to *click to load each unit* and *click to unload each unit* which isn't ideal.

    The basic idea is very much possible though.
    squishypon3 likes this.
  4. cptusmc

    cptusmc Active Member

    Messages:
    100
    Likes Received:
    52
    So are we able to link a script or something which could act as a robot clicking each unit in for you?
  5. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    [

    Yep, you're both spot on. We've implemented a multi-unit transport but you must load each unit one by one, and all the units are hidden within a box.
    cdrkf likes this.
  6. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Oh wait but you only need to click unload once, so there's that. :D
    cdrkf and stuart98 like this.

Share This Page