Page 1 of 1

Need a quick help

PostPosted: 09 Aug 2014, 17:58
by Michalpl
I need a script for infinite hunger aka auto food replenish

Re: Need a quick help

PostPosted: 10 Aug 2014, 08:49
by Skypper
this will feed all the units of the selected player.
  Code:
procedure AutoFeed(player: Integer); var k: integer; UnitsToFeed: array of integer; begin UnitsToFeed := States.PlayerGetAllUnits(player); for k := 0 to length(UnitsToFeed) - 1 do begin Actions.UnitHungerSet(UnitsToFeed[k], States.UnitMaxHunger); end; end;
you can use the code bye filling in the player number at the X
  Code:
AutoFeed(X);
Based on Andreus version that is implemented in Invasion