Jump to content

Question on resupply using spawned M818


Recommended Posts

In a training mission I spawn a HMMWV/Tow via scripting, as well as an M818. However, when I attempt to reload the HMMWV with the M818, I see the message:

 

Unable to start ammo replenishment: ammunition is not available

 

as if there is no truck there. However, if I have an M818 vehicle placed in the mission via the Mission Editor, it will replenish. I'm wondering if there's something special I need to do with a spawned M818 such that it will be treated as a re-supply vehicle.

 

Thanks,

Relent

DCSnosupply.thumb.jpg.071cf9451cf9d2f18d4da75538f2350f.jpg

Link to comment
Share on other sites

To my knowledge there is nothing special required for it to work. I just tried it out on the tester version and it was working fine. Is playerCanDrive set to true for the M-818? That is about the only thing I could think of that might be causing it. That or a bug that exists in the release build but not a tester build, but that is fairly rare.

The right man in the wrong place makes all the difference in the world.

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Does the M818 have a route and did it move towards the HMMWV? Or is it just spawned and sits there?

 

Also, is the M818 of the same country as the HMMWV?

 

Try to spawn the HMMWV using the EXACT structure as in the mission file. check if that works.

[TABLE][sIGPIC][/sIGPIC]|

[/TABLE]

Link to comment
Share on other sites

Thanks for the response FlightControl. You bring up a good point. When I used the mission editor I'm pretty sure the group/unit only had the spawn point with no additional waypoints. When I spawn the group/unit they always have the spawn point plus one waypoint. I will look into that and experiment some more (didn't realize that would make a difference to the behavior of an M818 ).

 

The groups/units I'm spawning are all coalition.country.USA (from memory,not at my PC).

 

I've compared the structure of the units in the mission file to what my script has and all of the properties look the same, which is one of the reasons I was scratching my head.

 

Thanks,

Relent


Edited by 609_Relentov
Link to comment
Share on other sites

Being the same country and having a route shouldn't matter. The only requirement is that its on the same coalition and within the rearm range for that object, which is usually 200m.

 

 

I've attached a test mission from 1.5.5 where it works for me. It uses mist.cloneInZone() because it is a quick and lazy way to spawn a unit. All that does is it makes sure to inherit the same properties of the existing unit placed in the editor. If that doesn't work it may be helpful to post a code snippet from however you are spawning it to see if anything is missing or incorrect or whatever.

dynAdd_rearm.miz

The right man in the wrong place makes all the difference in the world.

Current Projects: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

Hey Grimes - I tried your mission and the first time the resupply seemed to work via LAlt-\. After I let the two units spawn, I fired off all of the tows on the M1045 TOW, then drove a short distance away. When I tried LAlt-\ it said no ammo available, which was expected. Then I drove the M818 and parked it nearby and this time the resupply worked, so check.

 

I reviewed my scripts and after scouring the route/points and unit properties, the main thing I noticed is that for my template I included in the group: route.points[1].task.params.tasks[1].action = "EPLRS", so I reset the route.points[1].task.params.tasks table to nil, removing it. However, it didn't change the result, same as before.

 

Then I tried your mission again, and this time, I moved the spawned M1045 TOW a lot further away from the original 2 units that were put in the mission editor. After using up all of the ammo, I moved the spawned M818 near the spawned M1045 TOW, and this time, I saw the same thing I saw in my case - Unable to start ammo replenishment: ammunition is not available.

 

Grimes, can you re-play your mission again and try what I did - i.e. move the spawned units far away from the pre-existing units from the mission editor (e.g. a mile), then try to re-supply?

 

Thanks!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...