Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- toDespawn={}
- function eventNewPlayer(n)
- system.bindKeyboard(n, 3, true, true)
- end
- table.foreach(tfm.get.room.playerList, eventNewPlayer)
- function eventKeyboard(n,key,down,Px,Py)
- if key == 3 and not tfm.get.room.playerList[n].isDead then
- local id=tfm.exec.addShamanObject(10, Px+(tfm.get.room.playerList[n].isFacingRight and 5 or -5), Py-3, 0, 20, 0)
- table.insert(toDespawn,{os.time(),id})
- end
- end
- function eventLoop()
- for i,cannon in ipairs(toDespawn) do
- if cannon[1] <= os.time()-1500 then
- tfm.exec.removeObject(cannon[2])
- table.remove(toDespawn,i)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement