GMod - What are you working on? November 2015 (#51)
264 replies, posted
[QUOTE=Giraffen93;49123596][t]http://i.imgur.com/TRigfzX.jpg[/t]
higher res and automatic quantity + some color differences
pretty convincing considering they're sprites[/QUOTE]
How did you get that 3d effect even though they are 2d images?
[QUOTE=geferon;49123614]How did you get that 3d effect even though they are 2d images?[/QUOTE]
a sprite usually faces towards you at all times, but it won't always look good
[t]http://i.imgur.com/5lMTy0K.jpg[/t]
[QUOTE=Giraffen93;49123626]a sprite usually faces towards you at all times, but it won't always look good
[t]http://i.imgur.com/5lMTy0K.jpg[/t][/QUOTE]
Looks like you gotta decide which sprite you should draw first based on distance
[QUOTE=LegoGuy;49123689]Looks like you gotta decide which sprite you should draw first based on distance[/QUOTE]
[t]http://i.imgur.com/Hb0j68i.jpg[/t]
easier than i imagined v:v:v
and you're using Vector:DistToSqr, right? :s:
Code must be perfect.
[QUOTE=LegoGuy;49123793]and you're using Vector:DistToSqr, right? :s:
Code must be perfect.[/QUOTE]
i was using just distance, i usually use disttosqr, but it doesn't seem to make a performance difference
and also since i have hooks for everything, this was very easy to do:
[vid]https://my.mixtape.moe/dwequu.webm[/vid]
so with fallout 4 being released i have some juicy new sound assets. i also implemented using different sounds based on range
[video=youtube;xQvYUYPsJHw]http://www.youtube.com/watch?v=xQvYUYPsJHw&feature=youtu.be[/video]
Is cool...But the transition is a bit...No...Maybe you should play both sounds at half volume, and then mute the sound when you're too far away
[QUOTE=gonzalolog;49126977]Is cool...But the transition is a bit...No...Maybe you should play both sounds at half volume, and then mute the sound when you're too far away[/QUOTE]
yeah the transition is a bit harsh right now, but im still working on it so ill definitely look into adding that
...you know that effect is already in vanilla hl2 right? based on stereo channels
[QUOTE=Giraffen93;49127237]...you know that effect is already in vanilla hl2 right? based on stereo channels[/QUOTE]
but there are specific sound files for it which sound nice.
and the vanilla effect doesn't even seem to work that well, especially with explosions.
Yay finally got my first 3d2d hud working! I'm so proud of myself
[IMG]http://images.akamai.steamusercontent.com/ugc/583575429749736691/536A578A6D5FC24B2605E6E1D3D6C99F130D2E9F/[/IMG]
When I move my HUD studders. anyone here know why?
[QUOTE=CGHippo;49127668]Yay finally got my first 3d2d hud working! I'm so proud of myself
[IMG]http://images.akamai.steamusercontent.com/ugc/583575429749736691/536A578A6D5FC24B2605E6E1D3D6C99F130D2E9F/[/IMG][/QUOTE]
Why are you stealing my idea????
Just kidding, its just that im making a 3d2d hud too
[QUOTE=CGHippo;49127668]Yay finally got my first 3d2d hud working! I'm so proud of myself
[IMG]http://images.akamai.steamusercontent.com/ugc/583575429749736691/536A578A6D5FC24B2605E6E1D3D6C99F130D2E9F/[/IMG]
When I move my HUD studders. anyone here know why?[/QUOTE]
What is your parent?
[QUOTE=DropDeadTed;49127961]What is your parent?[/QUOTE]
[CODE]
hook.Add( "PostDrawOpaqueRenderables", "example", function()
local eyePos = LocalPlayer():EyePos()
local forward = LocalPlayer():GetForward()
local forwardAngle = forward:Angle()
cam.Start3D2D( eyePos + (forward * 20), Angle(0, forwardAngle.y-90, forwardAngle.r + 110), 0.2)
local DrawHealth = LocalPlayer():Health() or 0
local EchoHealth = LocalPlayer():Health() or 0
if DrawHealth > 250 then DrawHealth = 250 end
if DrawHealth < 0 then DrawHealth = 0 end
if DrawHealth == 0 then DrawHealth = 0 end
if DrawHealth != 0 then
draw.RoundedBox(1, -40, -50, (100) * DrawHealth / 100, 10, Color(204, 0, 0, 255))
end
draw.SimpleText( LocalPlayer():Health(), "TheDefaultSettings", 30, -53, Color(255,255,255,255))
cam.End3D2D()
end )
[/CODE]
That is my code right now.
Also viewmodels overlap it. Anyway to get it so it won't overlap?
[QUOTE=CGHippo;49128219][CODE]
hook.Add( "PostDrawOpaqueRenderables", "example", function()
local eyePos = LocalPlayer():EyePos()
local forward = LocalPlayer():GetForward()
local forwardAngle = forward:Angle()
cam.Start3D2D( eyePos + (forward * 20), Angle(0, forwardAngle.y-90, forwardAngle.r + 110), 0.2)
local DrawHealth = LocalPlayer():Health() or 0
local EchoHealth = LocalPlayer():Health() or 0
if DrawHealth > 250 then DrawHealth = 250 end
if DrawHealth < 0 then DrawHealth = 0 end
if DrawHealth == 0 then DrawHealth = 0 end
if DrawHealth != 0 then
draw.RoundedBox(1, -40, -50, (100) * DrawHealth / 100, 10, Color(204, 0, 0, 255))
end
draw.SimpleText( LocalPlayer():Health(), "TheDefaultSettings", 30, -53, Color(255,255,255,255))
cam.End3D2D()
end )
[/CODE]
That is my code right now.
Also viewmodels overlap it. Anyway to get it so it won't overlap?[/QUOTE]
I don't have that much experience with 3D2D so I asked someone who does.
[quote]
Seris: LocalPlayer():GetForward()
Seris: isnt that getting the forward of his entity and not his eyes?
Seris: that could be fucking with it
Seris: he needs to be using EyeAngles():Forward()
[/quote]
Try that, see if it helps.
[QUOTE=DropDeadTed;49128514]I don't have that much experience with 3D2D so I asked someone who does.
Try that, see if it helps.[/QUOTE]
Omg thanks so much!
The viewmodels still overlap the hud though. Any fix for this? Sorry for the spoonfeeding I'm learning 3D2D
[QUOTE=CGHippo;49128539]Omg thanks so much!
The viewmodels still overlap the hud though. Any fix for this? Sorry for the spoonfeeding I'm learning 3D2D[/QUOTE]
Use HUDPaint instead of postdrawopaquerenderables.
Make sure to encase your cam.Start3D2D inside a cam.Start3D though, since HUDPaint is not innately 3d.
[QUOTE=Z0mb1n3;49128564]Use HUDPaint instead of postdrawopaquerenderables.
Make sure to encase your cam.Start3D2D inside a cam.Start3D though, since HUDPaint is not innately 3d.[/QUOTE]
Are you able to provide an example of what this would look like?
[QUOTE=Z0mb1n3;49128564]Use HUDPaint instead of postdrawopaquerenderables.
Make sure to encase your cam.Start3D2D inside a cam.Start3D though, since HUDPaint is not innately 3d.[/QUOTE]
At the end hes going to do the same thing.
Its better to use postdrawopaquerenderables though do there are less stacks of codes and less tabs.
Looks better and more organized.
At the end both are going to do the same thing, but one with less lines and the other with more lines and tabbing.
CGHippo, leave it as it is
[editline]16th November 2015[/editline]
[QUOTE=CGHippo;49128593]Are you able to provide an example of what this would look like?[/QUOTE]
It would be the same, but with cam.Start3D() and cam.End3D() at the top and end of it.
Well since HUDPaint is drawn in such a way that I haven't read up on, it won't clip with anything, since it is ALWAYS drawn on top (as far as I know). What difference does an extra tab make if it avoids visual complications?
Hippo:
[code]
hook.Add("HUDPaint", "MyHud", function()
local pos = EyePos()
local forward = EyeAngles():Forward()
cam.Start3D()
cam.Start3D2D(pos + forward*4, EyeAngles()-Angle(0,90,0), 1)
-- Draw stuff here, yo
cam.End3D2D()
cam.End3D()
end)
[/code]
something like that.
Wait so even 3D rendering contexts will draw in front of everything if it's in HUDPaint?
[QUOTE=Z0mb1n3;49128642]Well since HUDPaint is drawn in such a way that I haven't read up on, it won't clip with anything, as it is ALWAYS drawn on top, as far as I know. What difference does an extra tab make if it avoids visual complications?[/QUOTE]
I think youre right in there.
Lets make CGHippo test it.
JUST DO IT
[QUOTE=geferon;49128662]I think youre right in there.
Lets make CGHippo test it.
JUST DO IT[/QUOTE]
Well I can guarantee you it works like that, but you are welcome to try it for yourselves.
I definetly fucking need a rest.
[editline]16th November 2015[/editline]
FUCK, MY AUTOMERGE.
Anyway, bye
[editline]16th November 2015[/editline]
[QUOTE=Z0mb1n3;49128677]Well I can guarantee you it works like that, but you are welcome to try it for yourselves.[/QUOTE]
I trust you
[CODE]
hook.Add("HUDPaint", "MyHud", function()
local eyePos = LocalPlayer():EyePos()
local forward = LocalPlayer():EyeAngles():Forward()
local forwardAngle = forward:Angle()
cam.Start3D()
cam.Start3D2D( eyePos + (forward * 20), Angle(0, forwardAngle.y-90, forwardAngle.r + 90), 0.2)
local DrawHealth = LocalPlayer():Health() or 0
local EchoHealth = LocalPlayer():Health() or 0
if DrawHealth > 250 then DrawHealth = 250 end
if DrawHealth < 0 then DrawHealth = 0 end
if DrawHealth == 0 then DrawHealth = 0 end
if DrawHealth != 0 then
draw.RoundedBox(1, -40, -50, (100) * DrawHealth / 100, 10, Color(204, 0, 0, 255))
end
draw.SimpleText( LocalPlayer():Health(), "TheDefaultSettings", 30, -53, Color(255,255,255,255))
cam.End3D2D()
cam.End3D()
end)
[/CODE]
This didn't draw anything. Sorry if I'm being stupid.
[QUOTE=CGHippo;49128712][CODE]
hook.Add("HUDPaint", "MyHud", function()
local eyePos = LocalPlayer():EyePos()
local forward = LocalPlayer():EyeAngles():Forward()
local forwardAngle = forward:Angle()
cam.Start3D()
cam.Start3D2D( eyePos + (forward * 20), Angle(0, forwardAngle.y-90, forwardAngle.r + 90), 0.2)
local DrawHealth = LocalPlayer():Health() or 0
local EchoHealth = LocalPlayer():Health() or 0
if DrawHealth > 250 then DrawHealth = 250 end
if DrawHealth < 0 then DrawHealth = 0 end
if DrawHealth == 0 then DrawHealth = 0 end
if DrawHealth != 0 then
draw.RoundedBox(1, -40, -50, (100) * DrawHealth / 100, 10, Color(204, 0, 0, 255))
end
draw.SimpleText( LocalPlayer():Health(), "TheDefaultSettings", 30, -53, Color(255,255,255,255))
cam.End3D2D()
cam.End3D()
end)
[/CODE]
This didn't draw anything. Sorry if I'm being stupid.[/QUOTE]
the angle might be backwards, try not having the y-90 in your Start3D2D angle?
EDIT:
clogging up this thread, steam message me
-dumb dumb dumb-
I need a rest.
Good night
[QUOTE=FPtje;49117212]
- Artistic -> "Stop talking about your Haskell crap, you massive cunt"[/QUOTE]
Hey! I never called you a massive cunt!
To make this on-topic: I don't have any screenshots or videos, but I'm working on a "building mode" system for DarkRP. The idea is that if you're inside an area you own, you can activate building mode, which will:
* Allow you limited use of noclip (based on Uclip).
* Create a barrier around the area, so you can't leave, and other people can't get in.
* Disable gameplay-critical entities like money printers in the area (so you can't just use it to stop people raiding you)
Also, those entities will stay disabled until you (or another player) press USE on them, while not in build mode. This is to partially prevent people making un-raidable bases - they have to be accessible from wherever the player spawns after leaving build mode.
Also as part of this, players buy areas (usually buildings), not doors.
Also my money printers use RD2 energy and coolant, and I *do* have a screenshot of that:
[img]http://puu.sh/loyBo.jpg[/img]
I made something that somewhat resembles a MIDI player.
[video=youtube;s5AomLeZvOQ]https://www.youtube.com/watch?v=s5AomLeZvOQ[/video]
I suppose now I have to get soundfonts working with it.
Sorry, you need to Log In to post a reply to this thread.