• What do you need help with? V3
    6,419 replies, posted
[QUOTE=RonanZer0;37922809]is it really that hard years and years of very hard work i have to learn just to make a sound play after a sound? wow. isnt this 'what do you need help with' and not 'if u dont know we wont help u o well *trollface*' >.> edit: -snip- useless image ^^ and people say google is your friend[/QUOTE] so why didnt you just do this in the first place?
Hey, im using "DProgress" in GMOD 13 and got it working fine. but is there some way to add text to it? or make it display the progress with text or a thing like that? i cant find any documentation on it. Thank you for any help.
[QUOTE=RonanZer0;37922809]is it really that hard years and years of very hard work i have to learn just to make a sound play after a sound? wow. isnt this 'what do you need help with' and not 'if u dont know we wont help u o well *trollface*' >.> edit: [IMG]http://www1.picturepush.com/photo/a/10693519/img/10693519.png[/IMG] ^^ and people say google is your friend[/QUOTE] [b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index1c1f.html]G.SoundDuration [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
[QUOTE=ralle105;37924933][b][url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index1c1f.html]G.SoundDuration [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b][/QUOTE] dont i still have to use timers for 100+ sounds?
[QUOTE=RonanZer0;37925074]dont i still have to use timers for 100+ sounds?[/QUOTe] give up on lua or learn to use lua edit the function where the game mode plays the sound and add a timer for SoundDuration(sound) or whatever its not that hard
[QUOTE=fairy;37925602]give up on lua or learn to use lua edit the function where the game mode plays the sound and add a timer for SoundDuration(sound) or whatever its not that hard[/QUOTE] i probably would if i knew where the functions where BUT I DONT :v:
the wiki ok? the damn wiki that has been up for ages. seriously stop posting every bug you run into. how about you try and fix it, you might even learn something
[QUOTE=G4MB!T;37926093]the wiki ok? the damn wiki that has been up for ages. seriously stop posting every bug you run into. how about you try and fix it, you might even learn something[/QUOTE] there is nothing that says anything about playing sounds after sounds on the wiki ahem GEE WOULDNT IT BE ALOT EASIER AND ONLY TAKE ONE POST IF YOU GUYS GAVE ME AN EXAMPLE xD?
[QUOTE=RonanZer0;37926653]there is nothing that says anything about playing sounds after sounds on the wiki ahem GEE WOULDNT IT BE ALOT EASIER AND ONLY TAKE ONE POST IF YOU GUYS GAVE ME AN EXAMPLE xD?[/QUOTE] it would have been a lot easier if you would have learned ANY lua before coming here and asking us, or even attempting to do what you're doing you're trying to ride a motorcycle and you've never even ridden a bike what the fuck
ye but seriously.. stop posting every error you get. try and debug them before coming here. and the wiki will not tell you exactly how to do what you want, just like the people here. you need to know what the problem consists of before you can solve it. your problem so far is that you have the sounds, and you want to play them one after the other. so you need a function that returns the length of the sound (SoundDuration) then you need a way to monitor when the next sound will play. put it in a think hook. when the sound plays do something like NextThink = CurTime() + SoundDuration(mysound) + 1; then check if the NextThink is less than CurTime. if it is then play the next sound. this shit isnt rocket science
[QUOTE=RonanZer0;37926653]GEE WOULDNT IT BE ALOT EASIER AND ONLY TAKE ONE POST IF YOU GUYS GAVE ME AN EXAMPLE xD?[/QUOTE] [lua]function DoStuff() --Play sound here --Insert timer here end[/lua] That's an example. Nobody will write the code for you, but if that's what you're wanting you're better off [url="http://www.facepunch.com/showthread.php?t=1193966"]Here[/url]
[QUOTE=G4MB!T;37926780] you want to play them one after the other.[/QUOTE] no...i should have explained it more clearly. i want after ONE sound to play after ONE sound is played. not repeat over and over again. that would be easy. (play a sound i type, THEN play sounds/npc/combine_soldier/vo/off1.wav AND NOTHING ELSE) EDIT: NINJA'D D:
i will seriously slap you until you stop moving.. [url]http://facepunch.com/showthread.php?t=1202786[/url] learn to lua or gtfo
Is there a way to make Particles serverside?
[QUOTE=Crossu88;37930310]Is there a way to make Particles serverside?[/QUOTE] [URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index09d2.html"]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index09d2.html[/URL] [editline]6th October 2012[/editline] I'm trying to make a homing function. Basically I spawn an ENT and it moves toward another. I Want to use ENT:ApplyForceCenter(), but I have no idea how to find the vector between the ENT and the target. Any suggestions?
I mean like custom particles, like in leeroy's weapon base.
[QUOTE=M0dSe7en;37930556][URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index09d2.html"]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index09d2.html[/URL] [editline]6th October 2012[/editline] I'm trying to make a homing function. Basically I spawn an ENT and it moves toward another. I Want to use ENT:ApplyForceCenter(), but I have no idea how to find the vector between the ENT and the target. Any suggestions?[/QUOTE] Do you mean the angle? [lua](Pos1 - Pos2):Angle()[/lua] [editline]6th October 2012[/editline] [QUOTE=G4MB!T;37926780]ye but seriously.. stop posting every error you get. try and debug them before coming here. and the wiki will not tell you exactly how to do what you want, just like the people here. you need to know what the problem consists of before you can solve it. your problem so far is that you have the sounds, and you want to play them one after the other. so you need a function that returns the length of the sound (SoundDuration) then you need a way to monitor when the next sound will play. put it in a think hook. when the sound plays do something like NextThink = CurTime() + SoundDuration(mysound) + 1; then check if the NextThink is less than CurTime. if it is then play the next sound. this shit isnt rocket science[/QUOTE] 2 edgy 4 me But really, quit being such an asshat. We can interact without shoving our opinions down everyone else's throats.
No. I mean I need to find the vector of the other ENT from the current one's perspective. I can do the rest from there.
[QUOTE=M0dSe7en;37931039]No. I mean I need to find the vector of the other ENT from the current one's perspective. I can do the rest from there.[/QUOTE] I don't know what you mean... draw a picture or something?
Ive added cutoms classes to DarkRP. Ive added two police force classes and Im wondering how to give them the commands the default police classes have? [B]EDIT[/B]: I managed to do it myself. Now I just need help with giving those classes the options on the F4 menu, I can want people etc. but the buttons dont appear on the F4 menu.
Is this right? ( I have a felling that its wrong) What I've typed: [CODE]function ENT:RemoveSpikes() self:SetNWBool("deployed", false) timer.Simple(1, function() MyFunc(self:Remove() self = nil) end) end[/CODE] Original: [CODE]function ENT:RemoveSpikes() self:SetNWBool("deployed", false) timer.Simple(1, function() self:Remove() self = nil end) end[/CODE] If its wrong tell me :S because I am confused right now... Thanks in Adv..
you cant name and define [del]call backs[/del] lambda (anonymous) functions. if a callback is ready defined (you want to use a premade function) then call it. other wise dont name it. and also your syntax is really weird.. timer.Simple(1, function() MyFunc(self:Remove() self = nil) end) change to timer.Simple(1, function() self:Remove() end)
[QUOTE=M0dSe7en;37931039]No. I mean I need to find the vector of the other ENT from the current one's perspective. I can do the rest from there.[/QUOTE] You mean like [code]local pos = ent1:WorldToLocal(ent2:GetPos())[/code] [url]http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index8160.html[/url]
[QUOTE=G4MB!T;37933317]you cant name and define call backs. if a callback is ready defined (you want to use a premade function) then call it. other wise dont name it. and also your syntax is really weird.. timer.Simple(1, function() MyFunc(self:Remove() self = nil) end) change to timer.Simple(1, function() self:Remove() end)[/QUOTE] I did not understood [CODE]--Timer calls no longer take var args to pass to callback --OLD: timer.Simple( 10, MyFunc, ”hello”, 10, 10 ) --NEW: timer.Simple( 10, function() MyFunc( “hello”, 10, 10) end ) --or local func = function() MyFunc( “hello”, 10, 10) end timer.Simple( 10, func )[/CODE] So whats the MyFunc? (GMod12 to GMod13)
redundant [editline]6th October 2012[/editline] because timers no longer pass arguments to their callbacks, if you need to pass arguments to a callback you now need to create a new anonymous function, and put your actual function in that with the arguments you want to pass to it. for a simple suicide callback (object that kills itself) you dont need to call any other callbacks unless you need to do some uninitializing or something before it dies. also calling self:Remove() then self = nil is ... silly, but atleast you are removing it before you a nullifying it :D you dont need the self = nil, it uninitializes itself when you remove it. so ye, just use the code i told you to replace it with, it will work the same (unless like i said you need to call something else before it dies)
Can someone please tell me what the fuck is up with this [IMG]http://puu.sh/1bZe0[/IMG] It worked before I went to get a drink and now it doesn't :( NEVER MIND SOME FUCKING PIXIES REMOVED THE CREATE FONT FUNCITON
-snip- [editline]6th October 2012[/editline] [QUOTE=andre_bule;37935832]-snip-[/QUOTE] Doesn't Work: timer.Simple(1, function() self:Remove() end) Does Work: timer.Simple(1, function() NAMEOFTHEFUNCTION self:Remove() end) Reason: Functions must have name -_-
[QUOTE=RonanZer0;37922809]is it really that hard years and years of very hard work i have to learn just to make a sound play after a sound? wow. isnt this 'what do you need help with' and not 'if u dont know we wont help u o well *trollface*' >.> edit: [IMG]http://www1.picturepush.com/photo/a/10693519/img/10693519.png[/IMG] ^^ and people say google is your friend[/QUOTE] Are you retarded or are you just acting like it? [lua]local function PlayDoubleSound(sound1, sound2) local dur = SoundDuration( sound1 ); surface.PlaySound( sound1 ); timer.Simple(dur, function() surface.PlaySound( sound2 ); end) return dur; end[/lua]
Does anyone know if you can get the damage taken to armor when using Player.TakeDamage?
[lua] local material = Material ("spawnicons/models/nova/airboat_seat.png") hook.Add("HUDPaint", "test", function() surface.SetDrawColor(255,255,255,255) surface.DrawRect(0,0,10,10) surface.DrawTexturedRect(material, 10,10, 250,250) end) [/lua] Any idea why that isn't working or is my gmod just fucked up massively. No errors, png exists and it doesn't draw but the white box does.
Sorry, you need to Log In to post a reply to this thread.