Jump to content
nbrown8568

Adding Staff to a Vehicle That is Not Staffed

Recommended Posts

For the sake of realism, I would like to staff the tow truck with an engineer.If I have a vehicle that needs repair I would rather call a tow truck with a tec. imo.

I have not yet made the attempt, but maybe someone can point me in the right direction.

 

Norm

Link to comment
Share on other sites

Need a few more issues to clear up. Engineer can leave the vehicle but cannot re-enter. here is the tow truck unit script and screenshot of assigned commands in the editor.

 

<unit id="TOW_TRUCK">
    <campaign>
        <missions value="1 2 3 4 5 6 7 8 9 10">
            <prototype name="mod:Prototypes/Vehicles/04 LA Tec/tow_truck.e4p" />
            <price value="250" />
            <speed value="80" />
            <space value="1" />
            <loadspace value="0" />
            <personnel>
                <unit id="ENGINEER2">
                    <defaultcount value = "1" />
                </unit>
            </personnel>
            <equipment />
        </missions>
    </campaign>
    <freeplay>
        <missions value="22">
            <prototype name="mod:Prototypes/Vehicles/04 LA Tec/tow_truck.e4p" />
            <price value="250" />
            <speed value="80" />
            <space value="1" />
            <loadspace value="0" />
            <personnel>
                <unit id="ENGINEER2">
                    <defaultcount value = "1" />
                </unit>
            </personnel>
            <equipment />
        </missions>
    </freeplay>        
</unit>
 

Editor Screenshots.zip

Link to comment
Share on other sites

Huh. Unit.xml space values are fine, and the engineer isn't missing the EnterCar command. I'm not sure what's going on.

 

Only thing I can think of is that the EnterCar script doesn't work with the vehicle type the tow truck is. I have a similar setup, but I haven't actually tested the engineer leaving and trying to reenter the truck.

 

Edit:

Yep, EnterCar is the culprit. The following will allow people with Repair to enter Tow Trucks, Engineering Trucks, Bulldozer, and the Bulldozer Transport. This should fix issue I haven't yet run into myself.

case VT_FIREFIGHTERS_ASF:case VT_THW_FGRI_EKW:case VT_THW_FGRR_RL:case VT_THW_FGRR_TRL:     if(!p.HasCommand("Repair"))          return false;     break;
case VT_THW_FGRR_BKF:

That is a Crane vehicle. The LA mod has a non-tech crane, so it's defined in a different way already. I've added the below into the case to define the Tech Crane and limit it to the engineer.

else if (StrCompare(v.GetPrototypeFileName(), VEH_CRANE) == 0){     if(!p.HasCommand("Repair"))          return false;} 
Link to comment
Share on other sites

I'm looking at the entercar script and I don't understand where to put this. I'm going to look at the entercar scripts in the other mods this may help me to understand it. But it may come down to me asking for more of your help.

 

Tried to fix it on my own with no success. Can you help me out.

 

Norm,

Edited by nbrown8568
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...