It sounds very simple.
Capture the port or destroy the supply dump. Add fuel and maybe ammo to the army that captures it, and reduce the same for the original owner.
Thing is, it doesn't seem to work and I can't work out why. Is there a trick to this or have I just missed a dumb mistake?
Tips on scripted Unit Actions
Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design
-
captainjack
- Brigadier-General - 15 cm Nblwf 41

- Posts: 1912
- Joined: Thu Sep 13, 2012 7:42 am
Re: Tips on scripted Unit Actions
One cannot subtract fuel or ammo from units, you can add or set.
The units must be in a zone or area you define.
I modified Border Raids so destroying the supply dump adds 100 fuel to Allies and sets Axis fuel to 0.
Note you have to click Core and/or Aux boxes for it to take effect.
The units must be in a zone or area you define.
I modified Border Raids so destroying the supply dump adds 100 fuel to Allies and sets Axis fuel to 0.
Note you have to click Core and/or Aux boxes for it to take effect.
- Attachments
-
Border Raids.pzloc.zip- (1.02 KiB) Downloaded 98 times
-
Border Raids.pzscn.zip- (5.1 KiB) Downloaded 84 times
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
Re: Tips on scripted Unit Actions
Actually you can substract. You just need to add negative values, -1, -2 and so on. At least it works with the strength parameter.
Eastern Front: Soviet Storm (v1.96): http://www.slitherine.com/forum/viewtopic.php?f=147&t=50342
Modern Conflicts (v2.10): http://www.slitherine.com/forum/viewtopic.php?f=147&t=72062
Modern Conflicts (v2.10): http://www.slitherine.com/forum/viewtopic.php?f=147&t=72062
Re: Tips on scripted Unit Actions
I just tested that and you're correct it does work that way with fuel and ammo too. Just need to make sure it's "add" not "set".Akkula wrote:Actually you can substract. You just need to add negative values, -1, -2 and so on. At least it works with the strength parameter.
You can also have it affect all units on the map easily by giving the action a hex of 1,1 and a radius of 99 or some arbitrarily high enough number.

-
captainjack
- Brigadier-General - 15 cm Nblwf 41

- Posts: 1912
- Joined: Thu Sep 13, 2012 7:42 am
Re: Tips on scripted Unit Actions
Thanks for the help. I think I'd been leaving some of the boxes unticked.
And yes, the screen says you add a negative number to remove fuel, ammo etc. Looks like I'd better get back to scenario editing now I can fix this.
And yes, the screen says you add a negative number to remove fuel, ammo etc. Looks like I'd better get back to scenario editing now I can fix this.
Re: Tips on scripted Unit Actions
Oddly enough I can't enter negative numbers to fuel or ammo.Akkula wrote:Actually you can substract. You just need to add negative values, -1, -2 and so on. At least it works with the strength parameter.
It's either my Mac keyboard or Wineskin.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
-
captainjack
- Brigadier-General - 15 cm Nblwf 41

- Posts: 1912
- Joined: Thu Sep 13, 2012 7:42 am
Re: Tips on scripted Unit Actions
I noticed that you have to have the box completely empty before you can enter the - sign (same goes for heroes).
So if it shows 0, you have to press delete first, then type -XX
So if it shows 0, you have to press delete first, then type -XX
Re: Tips on scripted Unit Actions
dalfrede wrote:Oddly enough I can't enter negative numbers to fuel or ammo.Akkula wrote:Actually you can substract. You just need to add negative values, -1, -2 and so on. At least it works with the strength parameter.
It's either my Mac keyboard or Wineskin.
THIS.captainjack wrote:I noticed that you have to have the box completely empty before you can enter the - sign (same goes for heroes).
So if it shows 0, you have to press delete first, then type -XX
Eastern Front: Soviet Storm (v1.96): http://www.slitherine.com/forum/viewtopic.php?f=147&t=50342
Modern Conflicts (v2.10): http://www.slitherine.com/forum/viewtopic.php?f=147&t=72062
Modern Conflicts (v2.10): http://www.slitherine.com/forum/viewtopic.php?f=147&t=72062

