• GMod 10 Lua - Snow and Firework Video Tutorial - 1080p
    27 replies, posted
I have recently looked for video tutorials and found them to be somewhat bad most of the time. So i decided i'd have a crack myself using proper tools and proper resolutions. So I've made a tutorial that even your Gran could follow :) Enjoy. [b] I do honestly think it looks best on 720p, maybe that's just me. [/b] [b][u]Part 1.[/u][/b] [media]http://www.youtube.com/watch?v=BTbkfNTkNAI[/media] [b][u]Part 2.[/u][/b] [media]http://www.youtube.com/watch?v=HU_3J0gFgDQ[/media] [b][u]Part 3.[/u][/b] [media]http://www.youtube.com/watch?v=9X5Rq0HU0Ow[/media] Well i hope someone likes this :)
i haven't finished even part one yet, but this is quite a good way, i like these kind of tutorials, and for more beginners i'm sure this is perfect, hands on. Good job.
:) thanks sir. I will now make more.
Hehe dave, It's real life bro. Ok what is wanted next. Full Derma Guide OR Emit Sound Tut OR Making Images for Source
Also. If you want random fireworks not on a console command. you could do [lua] local trace = Vector(math.random(0,4000),math.random(0,4000),4000) [/lua] and at the bottom of the function [lua] timer.Create("firewrk", 0.1, 0, fireworks) [/lua] i know it's simple, but it's actually pretty cool, hook this on a umsg or something and it'd be a nice feature :) [B]Edit:[/B] Also, i think you shouldn't do tutorials on those, those things you can easily find on the wiki, specially the full derma guide, not that i have any suggestions, but something difficult and not ordinary would by cool :)
Ok antid thanks for the comments. What about creating a HUD with images?
hmm, sounds a bit easy, but kind of cool. what about..hmm...a simple chat? redone, not just chat commands but a re-designed...I haven't looked too far into it. but for the most part i see functions for it. [b][url=wiki.garrysmod.com/?title=Gamemode.OnPlayerChat]Gamemode.OnPlayerChat [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] [b][url=wiki.garrysmod.com/?title=Chat.AddText]Chat.AddText [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] OR, perhaps a mdl placement? [url]http://www.facepunch.com/showthread.php?t=767282[/url] thats a hat maker, but maybe make a tutorial how to put an object or model rather on a players head or body part.
Hehe, believe it or not it's also a learning curve for me as im using this to teach myself too.
ah :) okay haha hmm ill tink of some stuff, but it's 4am i g2g bed, if you want to add me to steam "antid2351" you can and il give you some ideas
Added thanks.
:eng101: Thanks, Thats all I have to say
[url]http://www.facepunch.com/showthread.php?t=878986[/url] You cant find it when its three fourms down? :saddowns:
Well i can't too much sense of it .. but meh.. Tonights video is planned. (GMT)
Yeh ok iR, One is uploading Naow! 300th post. Woot
Thanks, just did the entire tutorial, however some suggestions: Render future videos exactly like you did part 2, the other ones were unreadable, so I ended up hyper coding the whole thing in side by side windows while you talked. Edit: Can you tell me what the shit is wrong with this: [lua] function firework() local trace = LocalPlayer():GetEyeTrace():HitPos local emt = ParticleEmitter(trace) for i=1, 300 do local party = emt:Add("sprites/light_glow02_add", trace) if party then party:SetColor(math.random(25,50), math.random(25,50), math.random(25,50), math.random(50,255)) party:SetVelocity(Vector(math.random(-1000,1000),math.random(-1000,1000),math.random(-1000,1000)):GetNormal() * 1500) party:SetDieTime(5) party:SetLifeTime(0) party:SetStartSize(600) party:SetEndSize(0) end end emt:Finish() end concommand.Add("shootfire", firework) function snowday() timer.Stop("fuller") local emt2 = ParticleEmitter(Vector(0,0,400)) timer.Create("fuller", 0.1, 0, function() for i=1, 1000 do local snowparty = emt2:Add("particle/snow",LocalPlayer():GetPos() + Vector(0,0,1000)) snowparty:SetVelocity(Vector(math.random(-700,700),math.random(-700,700),math.random(-300,-100))) snowparty:SetDieTime(4) snowparty:SetStartAlpha(0) snowparty:SetEndAlpha(255) snowparty:SetStartSize(5) snowparty:SetEndSize(math.random(0,3)) snowparty:SetColor(255,255,255) snowparty:SetRoll(math.random(0,360)) end end) emt2:Finish() end function sunny() timer.Destroy("fuller") end concommand.Add("startsnow", snowday) concommand.Add("endsnow", sunny) [/lua] I used everything like you said except different names, and I get this in console if I try to load it: [code] ] lua_openscript autorun/firework.lua Running script autorun/firework.lua... autorun/firework.lua:4: function arguments expected near 'local' [/code] In addition, that breaks the rest of it.
[lua] local trace = LocalPlayer():GetEyeTrace():HitPos [/lua] should be [lua] local trace = LocalPlayer():GetEyeTrace().HitPos [/lua]
Do a derma guide. People need to start defining custom panels rather than making a giant function that creates their vgui stuff.
[QUOTE=DarkSpider;19811063]Do a derma guide. People need to start defining custom panels rather than making a giant function that creates their vgui stuff.[/QUOTE] Hehe, errrr, i do that. Teach me how? Then i will teach the rest.
[QUOTE=antid2;19810828][lua] local trace = LocalPlayer():GetEyeTrace():HitPos [/lua] should be [lua] local trace = LocalPlayer():GetEyeTrace().HitPos [/lua][/QUOTE] Ah, thanks. I was under the impression that : == .
Yeh I had that error and was like "erm, facepunch how do I do this ;)" and I did get an answer. I love to see peoe helping other people out and it's why I do these.videos, helping out the little people =}
This will be useful for many people, hope to see more tutorials like this in the future!
[QUOTE=noforgivin;19812623]Yeh I had that error and was like "erm, facepunch how do I do this ;)" and I did get an answer. I love to see peoe helping other people out and it's why I do these.videos, helping out the little people =}[/QUOTE] [code] ] startsnow autorun/firework.lua:26: attempt to call global 'ParticleEmitter' (a nil value) ] stopsnow Unknown command: stopsnow ] shootfire autorun/firework.lua:3: attempt to call global 'LocalPlayer' (a nil value) ] shootfire autorun/firework.lua:3: attempt to call global 'LocalPlayer' (a nil value) [/code] Could you post your code so that we can make sure that we didn't make stupid mistakes? >_>
Don't put it in autorun put it in autorun/client
[QUOTE=nicatronTg;19813210][code] ] startsnow autorun/firework.lua:26: attempt to call global 'ParticleEmitter' (a nil value) ] stopsnow Unknown command: stopsnow ] shootfire autorun/firework.lua:3: attempt to call global 'LocalPlayer' (a nil value) ] shootfire autorun/firework.lua:3: attempt to call global 'LocalPlayer' (a nil value) [/code] [/QUOTE] Basically you put it in autorun, so it runs on the server. The functions ParticleEmitter and LocalPlayer does not exist on the server. The solution is to run it on the client, for example by putting it in autorun/client
Sorry, you need to Log In to post a reply to this thread.