Hello guys..
Can someone help my I can't make this work for GMOD 13. I don't know what I'm doing wrong?
[CODE]function VehicleSpeedBlur ( )
if (!LocalPlayer():InVehicle()) then return; end
local BlurMaterial = Material( "pp/blurscreen" )
local VehSpeed = math.Round(LocalPlayer():GetVehicle():GetVelocity():Length() / 17.6);
render.UpdateScreenEffectTexture();
BlurMaterial:[U]SetMaterialFloat[/U]("$blur", VehSpeed*.01);
render.UpdateScreenEffectTexture()
render.SetMaterial(BlurMaterial);
render.DrawScreenQuad();
end;
hook.Add("RenderScreenspaceEffects", "", VehicleSpeedBlur);[/CODE]
I get this error when I enter a vehicle:
[CODE]attempt to call method 'SetMatrialFloat' <a nil value>[/CODE]
See the wiki please, also, you should rather use the blur value hook, looks better imo.
Okay. I'll see if I can find something.
If you have any issues with GM13 code that would otherwise work in GM12, ctrl+f both of these and search to see if what you are using has changed:
[url]https://docs.google.com/document/d/1dVgp8ojkrIjxVRFADUF5uwZQiLLivHixkmV5PW5v9Fw/edit[/url]
[url]https://docs.google.com/document/d/1khSuIYrAMkqXu7wlH5YRJNwz6hOH6Xqi5lqBhE3x6gA/edit[/url]
[QUOTE=Cushie;37996596]If you have any issues with GM13 code that would otherwise work in GM12, ctrl+f both of these and search to see if what you are using has changed:
[url]https://docs.google.com/document/d/1dVgp8ojkrIjxVRFADUF5uwZQiLLivHixkmV5PW5v9Fw/edit[/url]
[url]https://docs.google.com/document/d/1khSuIYrAMkqXu7wlH5YRJNwz6hOH6Xqi5lqBhE3x6gA/edit[/url][/QUOTE]
Hmm.. I can't find any changes to this? But thanks anyways.
[quote]Renamed Material:[Get|Set]Material* to Material:[Get|Set][/quote]
BlurMaterial:SetFloat("$blur", VehSpeed*.01);
[QUOTE=Cushie;37997795]BlurMaterial:SetFloat("$blur", VehSpeed*.01);[/QUOTE]
Oh Thanks. I didn't see that one.
Sorry, you need to Log In to post a reply to this thread.