Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function widget:UnitCreated(unitID, unitDefID, unitTeam)
- local ud = UnitDefs[unitDefID]
- if ((ud ~= nil) and (unitTeam == Spring.GetMyTeamID())) then
- if (ud.name == "esilo" or ud.name == "eshieldgen") then
- -- give stockpilers 5 units to build
- Spring.GiveOrderToUnit(unitID, CMD.STOCKPILE, {}, { "shift" })
- elseif (ud.name == "ecruisesilo") then
- -- give stockpilers 5 units to build
- Spring.GiveOrderToUnit(unitID, CMD.STOCKPILE, {}, { "ctrl" })
- else
- Spring.Echo("Waffles!!!")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement