Advertisement
Guest User

Example Blink

a guest
Apr 19th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. function myFunction()
  2.     sb.logInfo("You pressed the G key!")
  3.     local aimPosition = tech.aimPosition()
  4.     --we will do our "out" effect here
  5.     local configTable = {
  6.         timeToLive = 0.01, -- we want the projectile to die as soon as possible to spawn the particles
  7.         actionOnReap = {
  8.             {
  9.                 action = "loop",
  10.                 count = 6,
  11.                 body =  {
  12.                     {
  13.                         action = "particle",
  14.                         specification = {
  15.                             type = "textured",
  16.                             image = "/items/generic/crafting/wildvines.png",
  17.                             timeToLive = 1.2,
  18.                             destructionAction = "fade",
  19.                             destructionTime = 0.2,
  20.                             layer = "front",       
  21.                             size = 0.6,        
  22.                             rotation = 0,
  23.                             velocity = {0.2,-5},
  24.                             variance = {
  25.                                 velocity = {0.5,0},
  26.                                 rotation = 60,
  27.                                 angularVelocity = 180,
  28.                                 position ={2,2}
  29.                             }
  30.                            
  31.                         }
  32.                     }
  33.                 }
  34.             }
  35.         }
  36.     }
  37. world.spawnProjectile("invisibleprojectile",mcontroller.position(),entity.id(),{0,0},false,configTable)
  38.     mcontroller.setPosition(aimPosition)
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement