Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. function widget:GetInfo()
  2.   return {
  3.     name      = "Hello Unit",
  4.     desc      = "print a message when a unit is created",
  5.     author    = "knorke",
  6.     date      = "2012",
  7.     license   = "free for horse riding",
  8.     layer     = 0,
  9.     enabled   = true
  10.   }
  11. end
  12.  
  13. function widget:UnitCreated(unitID, unitDefID, teamID, builderID)
  14.     Spring.Echo ("hello unit!")
  15.     Spring.Echo ("the unitDefID is " .. unitDefID)
  16.     Spring.Echo ("the unitID is " .. unitID)
  17.     Spring.Echo ("the unit belongs to team " .. teamID)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement