GMod - What are you working on? January 2015 (#41)

Thats just amazing! I cant wait to try it out

It’s a hook in CreateMove that traces ahead by the player’s velocity, calculates how far the hitpos is away from the predicted pos, and turns accordingly.


local lookahead = 0.5
local ply = LocalPlayer()
hook.Add("CreateMove", "bhop_turn", function(cmd)
	local vel = ply:GetVelocity()
	vel.z = 0
	tr = util.TraceHull{
		start = ply:GetPos(), 
		endpos = ply:GetPos() + vel * lookahead,
		mins = Vector(-16, -16, 0),
		maxs = Vector(16, 16, 72),
		filter = ply,
		mask = MASK_PLAYERSOLID,
	}
	if tr.Hit then
		local ang = cmd:GetViewAngles()
		ang.y = ang.y + (cmd:GetSideMove() / -10000) * tr.HitPos:Distance(ply:GetPos()  + vel * lookahead) / 100
		ang:Normalize()
		cmd:SetViewAngles(ang)
	end
end)

hook.Add("CreateMove", "bhop", function(cmd)
	if not cmd:KeyDown(IN_JUMP) then return end --do we even want to bhop
	if LocalPlayer():IsOnGround() then return end --would we wanna jump
	if LocalPlayer():GetMoveType() == MOVETYPE_NOCLIP or LocalPlayer():WaterLevel() >= 2 then return end --does it make sense to jump?
	cmd:SetButtons(cmd:GetButtons() - IN_JUMP) --while in air, don't jump	
end)

Warning–it might set your eyeangle’s yaw to infinity.

It isn’t proper flappy garry without garry’s face on it!

[editline]2nd January 2015[/editline]

Slap garry’s face on it.

I couldn’t find a side view of Garry’s face unfortunately

Just use this

http://www.journaldugamer.com/files/2014/01/camera2x.jpg[/t]
EDIT: Here’s a shitty paint cut out
[t]http://i.imgur.com/ISCd5sO.png

I don’t really know what to do with the scoreboard. I’ll have to get some information in there like kills, and such. If you’re wondering about the dragon in the middle, a friend of mine just said it as a joke, but it ended up quite nicely.

The text to speech kinda sucks, though. It was pretty slow :tinfoil:

ill blow you later

i think mins and maxs should be -12, -12 and 12, 12 tho

Just wondering how you did those bars at the bottom? I’ve seen that style before just not sure how to recreate it efficiently.

how has this not been brought up in the TTS conversation:

http://forum.facepunch.com/showthread.php?t=1427994&p=46272229&viewfull=1#post46272229

Looks like an HUD I made a month ago

has the dark bar under everything fad not stopped yet?

Should I do the info like this?

DEATHS KILLS PING
DEATHS KILLS PING
DEATHS KILLS PING
DEATHS KILLS PING
DEATHS KILLS PING

No, just create a new row with these titles

I get what you’re saying.

Drop the silk icons

I like them there.

Can we have options to disable silkicons? :dance:

A lone man’s meal:
[img_thumb]http://i.imgur.com/lnn4KY0.png[/img_thumb]

Are those all custom made resources? Models/textures