Map Database  •  FAQ  •  RSS  •  Login

Need a quick help

<<

Michalpl

Sword Fighter

Posts: 318

Joined: 10 May 2014, 21:46

KaM Skill Level: Fair

Post 09 Aug 2014, 17:58

Need a quick help

I need a script for infinite hunger aka auto food replenish
<<

Skypper

Knight

Posts: 436

Joined: 28 Jun 2013, 09:37

KaM Skill Level: Fair

Location: Dutch :D

Post 10 Aug 2014, 08:49

Re: Need a quick help

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
Greets Skypper (Totally Insane)

- Beginning map maker -

Return to “Dynamic Scripting”

Who is online

Users browsing this forum: No registered users and 11 guests