ForbodingAngel

Untitled

Sep 1st, 2014
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function widget:UnitCreated(unitID, unitDefID, unitTeam)
  2. local ud = UnitDefs[unitDefID]
  3. if ((ud ~= nil) and (unitTeam == Spring.GetMyTeamID())) then
  4. if (ud.canStockpile && ud.unitName == "esilo") then
  5. -- give stockpilers 100 units to build
  6. Spring.GiveOrderToUnit(unitID, CMD.STOCKPILE, {}, { "shift" })
  7. else
  8. Spring.Echo("Waffles!!!")
  9. end
  10. end
Advertisement
Add Comment
Please, Sign In to add comment