Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function myFunction()
- sb.logInfo("You pressed the G key!")
- local aimPosition = tech.aimPosition()
- --we will do our "out" effect here
- local configTable = {
- timeToLive = 0.01, -- we want the projectile to die as soon as possible to spawn the particles
- actionOnReap = {
- {
- action = "loop",
- count = 6,
- body = {
- {
- action = "particle",
- specification = {
- type = "textured",
- image = "/items/generic/crafting/wildvines.png",
- timeToLive = 1.2,
- destructionAction = "fade",
- destructionTime = 0.2,
- layer = "front",
- size = 0.6,
- rotation = 0,
- velocity = {0.2,-5},
- variance = {
- velocity = {0.5,0},
- rotation = 60,
- angularVelocity = 180,
- position ={2,2}
- }
- }
- }
- }
- }
- }
- }
- world.spawnProjectile("invisibleprojectile",mcontroller.position(),entity.id(),{0,0},false,configTable)
- mcontroller.setPosition(aimPosition)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement