×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Script] Fireworks
[Script] Fireworks
Issey
« Citoyen »
1387201020000
    • Issey#0000
    • Profil
    • Derniers messages
#1
  0
Click 2 places on the map to make an invisible firework go up from the place you clicked first.

Invisible fireworks a dit :
lights={1,2,4,9,11,13}
delay=os.time()
firework_x,firework_y=400,380
blast_x,blast_y=400,200
trail=0
divisions=0
done=false
f=0

function eventNewPlayer(name)
system.bindMouse(name,true)
end

for name in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function eventMouse(name,x,y)
if first_person==nil and f==0 then
first_person=name
firework_x=x
firework_y=y
else
local vx,vy
blast_x=x
blast_y=y
trail_x=firework_x
trail_y=firework_y
divisions_x=(blast_x-firework_x)/10
divisions_y=(blast_y-firework_y)/10
if divisions_x<0 then divisions_x=0-(divisions_x) end
if divisions_y<0 then divisions_y=0-(divisions_y) end
divisions=divisions_x>divisions_y and divisions_y or divisions_x
divisions=math.floor(divisions+0.5)
if divisions%2==1 then
divisions=divisions+1
end
path_x=(blast_x-firework_x)/divisions
path_y=(blast_y-firework_y)/divisions
end
end

function eventLoop(ct,tr)
if trail<divisions then
for i=1,2 do
for i=1,3 do
vx=math.random()+math.random(-1,1)
vy=math.random()+math.random(-1,1)
tfm.exec.displayParticle(lights[math.random(#lights)],trail_x,trail_y,vx,vy,0,0)
end
trail_x=trail_x+path_x
trail_y=trail_y+path_y
trail=trail+1
end
end
if trail>0 and trail==divisions then
done=true
trail=0
divisions=0
end
if done then
for i=1,(math.random(20,100)) do
local vx,vy
vx=math.random()+math.random(-1,1)
vy=math.random()+math.random(-1,1)
tfm.exec.displayParticle(lights[math.random(#lights)],blast_x,blast_y,vx,vy,0,0)
end
done=false
f=1
time=os.time()
end
if f==1 and time<os.time()-300 then
local x,y,vx,vy
for i=1,math.random(13) do
x=blast_x+math.random(-40,40)
y=blast_y+math.random(-40,40)
for i=1,math.random(7) do
vx=math.random()+math.random(-1,1)
vy=math.random()+math.random(-1,1)
tfm.exec.displayParticle(lights[math.random(#lights)],x,y,vx,vy,0,0)
end
end
f=math.random(0,1)
if f==0 then first_person=nil end
end
end

much complicate script
wow
such lights
Otroivan
« Citoyen »
1387226220000
    • Otroivan#0000
    • Profil
    • Derniers messages
    • Tribu
#2
  0
Copy?
Topic-537427
Issey
« Citoyen »
1387226340000
    • Issey#0000
    • Profil
    • Derniers messages
#3
  0
Otroivan a dit :
Copy?

Nope, that script blasts fireworks in a fixed shape, mine generates fireworks at random.
Otroivan
« Citoyen »
1387227120000
    • Otroivan#0000
    • Profil
    • Derniers messages
    • Tribu
#4
  0
Sorry,Is AMAZING!
Curlfeather
« Citoyen »
1393433460000
    • Curlfeather#0000
    • Profil
    • Derniers messages
#5
  0
Hey Issey! Could you pherhaps put this on pastiben or something? I find it hard to copy the script.
Tailtong
« Citoyen »
1393435080000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#6
  0
Here's the raw version of it. http://pastebin.com/raw.php?i=xduPXsPE
Curlfeather
« Citoyen »
1393521900000
    • Curlfeather#0000
    • Profil
    • Derniers messages
#7
  0
Thanks! ^
Maagoooo
1396125300000
    • Maagoooo#0000
    • Profil
    • Derniers messages
#8
[Modéré par Mausibiene, raison : Speak English on the EN forum.]
Lolzermp
« Citoyen »
1396318320000
    • Lolzermp#0000
    • Profil
    • Derniers messages
#9
  0
how do you do dis?
Lullshare
« Citoyen »
1401772380000
    • Lullshare#0000
    • Profil
    • Derniers messages
#10
  0
how you do the firework? i click everywhereeeeeeeeeeeee, but not working :O
Cutylilian
« Citoyen »
1402091340000
    • Cutylilian#0000
    • Profil
    • Derniers messages
    • Tribu
#11
  0
Lullshare a dit :
how you do the firework? i click everywhereeeeeeeeeeeee, but not working :O

Make sure you see this:
a dit :
##[Lullshare] Lua script loaded in 1 ms (4000 max)

Or try doing it again. It works for me...
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Script] Fireworks
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27