|
Post by Stanenberg on May 4, 2021 12:57:27 GMT 1
That was done in the HRA Mod by hungaryblitz
|
|
|
Post by Quintaxel on May 8, 2021 13:23:28 GMT 1
Here it is then. The video I promised earlier. I know, making videos is not my stongest point The script does what I had in mind. Supply units will get supplies 'off the map'. This is just a demo but this script can be used on larger maps, making this supply system interesting.......or not. I have not tested it in an actual game but I curious how it will turn out. I still have to add some script to reduce the number of resupply round by on if a supply unit is killed in the game. This should not be to difficult. There are some limitations, or rather things that need to be take into account when using the script. BK Lua is limited and I can not queue instructions. So each truck needs to be put in a separate function like below. function TestTransport ()
SupplyByTruck (10, "WP0", tab_track_a, "Drop3", 5000, 3);
end; This will not work because the function controlling the supply of trucks can only handle one unit at a time. function SupplyRoutine ()
SupplyByTruck (10, "WP0", tab_track_a, "Drop3", 5000, 3);
SupplyByTruck (11, "WP0", tab_track_b, "Drop3", 8000, 5); end; I hope this makes sense and as said this is a limitation of BK Lua but not a problem to make the script work. Know that the point where supply units spawn as loaded and disppear as empty can be any place on the map. You could use a building or a tunnel so the swap trick is hidden from sight.
|
|
|
Post by [BMG]Neutro on May 10, 2021 0:22:08 GMT 1
If i manually interrupt by controlling the truck as player (move command, stop command etc. to save him for enemys) after the truck is empty and one is one his way back, will the truck after some time try again to move automatically back to his start point or wait for ever? I am confused sorry.
|
|
|
Post by Quintaxel on May 10, 2021 7:50:06 GMT 1
When the player takes control of the empty truck when it's on its way back to the edge of the map then the truck will have to be placed on the droppoint again. If the player takes control of a full truck then the resupply routine stops. The truck stays under control of the player until he drops the unit on it's droppoint.
I'm glad you mention it because these actions need to be rescripted to make the script more robust. It would be possible to make a truck resume it's routine after it was interupted but then you could get trucks wandering off again. Another thing that could be changed is the possibility that the player can place a supply truck on any droppoint. I would have to think about how this could be done.
The problem is not how to script this but to keep the script easy to use for mappers.
Edit: Problem solved. Player can now take full control of the supply unit at any point during the resupply routine. Just drop the unit on the droppoint and the truck will get new supplies.
|
|
|
Post by [BMG]Neutro on May 10, 2021 18:01:54 GMT 1
Now i got it, awesome work.
This means ANY droppoint?
|
|
|
Post by Quintaxel on May 10, 2021 21:53:23 GMT 1
Thanks,
This may need a little explanation. A you can see in the demo each units move to another place on the map. You can see there are these wooden decks close to where the unit stops. Each wooden deck is a droppoint (in fact it is a script area, the wooden deck is used so the droppoint can be recognized)
Now each supply unit is linked to one of these droppoints. So in case of the demo the player needs to put the truck on the droppoint that is linked to the supply unit to get resupplies. It should be possible to change the script so that each supply unit can be dropped on any droppoint to order the unit to get supplies. So in in case of the demo, any of the three droppoints. I qhould also be possible to activate or deactivate these droppoints so you only gets supplies when certain conditions are met. I hope you understand what I’m trying to eplain.
|
|
|
Post by [BMG]Neutro on May 13, 2021 22:55:52 GMT 1
Yes very well explained i just missed the Information (FAQ for Readme) i think its could maybe a bit confusing while playing a hectic mission to care as player about to drop of the truck at the "correct" droppoint. Would be very confrotable if you can drop the Truck on ANY droppoint. The Second point is also very intresting.
|
|
|
Post by Quintaxel on May 15, 2021 11:33:58 GMT 1
Thanks for the feedback. Now I want to keep the script simple to use so I will have to think of a smart way to make it possible that the supply trucks can be dropped on any droppoint. Still resupplies will come in from the point on the map where the supply truck is linked to.
|
|