Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Virar objetos
- -- Créditos:Brenower
- -- Tables
- data={};
- -- Inicio do script
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.newGame(0)
- for i in pairs(tfm.get.room.playerList) do
- nD={
- ["id"]=id;
- };
- data[i] = nD;
- tfm.exec.bindKeyboard(i,37,true,true)
- tfm.exec.bindKeyboard(i,38,true,true)
- tfm.exec.bindKeyboard(i,39,true,true)
- tfm.exec.bindKeyboard(i,40,true,true)
- id=tfm.exec.addShamanObject(39,tfm.get.room.playerList[i].x,tfm.get.room.playerList[i].y,0,0,0,true)
- data[i].id = id;
- end
- -- Eventos do teclado
- function eventKeyboard(player,key,down,x,y)
- local ido = data[player].id
- local mo = tfm.exec.moveObject
- if key == 37 then
- mo(ido,xx,yy,false,-30,0,false)
- end
- if key == 38 then
- mo(ido,xx,yy,false,0,-40,false)
- end
- if key == 39 then
- mo(ido,xx,yy,false,30,0,false)
- end
- end
- -- Loop
- function eventLoop()
- for i in pairs(tfm.get.room.playerList) do
- tfm.exec.displayParticle(2,tfm.get.room.objectList[data[i].id].x,tfm.get.room.objectList[data[i].id].y,0,0,0,0,i)
- tfm.exec.displayParticle(1,tfm.get.room.objectList[data[i].id].x-5,tfm.get.room.objectList[data[i].id].y,0,0,0,0,i)
- tfm.exec.displayParticle(13,tfm.get.room.objectList[data[i].id].x+5,tfm.get.room.objectList[data[i].id].y,0,0,0,0,i)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment