Advertisement
ForbodingAngel

Untitled

Sep 1st, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 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.name == "esilo" or ud.name == "eshieldgen") then
  5. -- give stockpilers 5 units to build
  6. Spring.GiveOrderToUnit(unitID, CMD.STOCKPILE, {}, { "shift" })
  7. elseif (ud.name == "ecruisesilo") then
  8. -- give stockpilers 5 units to build
  9. Spring.GiveOrderToUnit(unitID, CMD.STOCKPILE, {}, { "ctrl" })
  10. else
  11. Spring.Echo("Waffles!!!")
  12. end
  13. end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement