Advertisement
Guest User

Untitled

a guest
May 12th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.17 KB | None | 0 0
  1. -- Create a players group, pass in players
  2. p1 = players( 1 )
  3.  
  4. -- Create a death counter for a specific type
  5. dc = deathcounter( "Alan Schezar (Goliath)" )
  6.  
  7. -- The player of a death counter can be changed at any time
  8. dc:setplayer( 1 )
  9.  
  10. -- Example of creating a trigger
  11. -- The user (users of LIT, meaning you) must always manually call
  12. -- conditions( ) and actions( ) upon a player object
  13. p1:conditions( )
  14. always( )
  15. p1:actions( )
  16. dc:add( 1 )
  17.  
  18. -- Create another trigger
  19. p1:conditions( )
  20. dc:exactly( 64 )
  21. p1:actions( )
  22. text( "print this" )
  23. dc:setto( 0 )
  24.  
  25. -- Create a new players group
  26. p34 = players( 3, 4 )
  27. acc = accumulate( 1 )
  28.  
  29. -- Another simple trigger example
  30. p34:conditions( )
  31. acc:exactly( 1, ore )
  32. p34:actions( )
  33. centerview( "Anywhere" )
  34.  
  35. -- Example of making a Lua function to do some slightly
  36. -- heavier lifting! Original idea from Kaias
  37. function cleartext( )
  38.   for i = 0, 11 do
  39.     text( "" )
  40.   end
  41. end
  42.  
  43. p34:conditions( )
  44. always( )
  45. p34:actions( )
  46. cleartext( )
  47.  
  48. -- Hyper triggers with looping example
  49. p78 = players( 7, 8 )
  50.  
  51. for i = 0, 3 do
  52.   p78:conditions( )
  53.   always( )
  54.   p78:actions( )
  55.   for i = 0, 64 do
  56.     preserve( )
  57.   end
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement