GMod - What are you working on? November 2017 (#75)
191 replies, posted
[QUOTE=bobbleheadbob;52894930]Are you playing this singleplayer? You may need to call it clientside, and in singleplayer the shared methods are only called serverside for some motherfucking reason.
This snippet works well:
[lua]
function SWEP:Reload()
if SERVER and game.IsSinglePlayer() then
self:CallOnClient("Reload")
end
--reload code
end
[/lua][/QUOTE]
It's because of prediction - calling SendWeaponAnim serverside in single-player will update the client automatically (applies for most methods that network their results).
[editline]16th November 2017[/editline]
[QUOTE=a1steaksa;52894655]PS if anyone knows either how to force a reload on a weapon with a full magazine or why animations sometimes don't play or don't play right on viewmodels using SendWeaponAnim( ACT_VM_RELOAD ) it would be an enormous help to me.[/QUOTE]
[code]lua_run Entity(1):GetActiveWeapon():SendWeaponAnim(ACT_VM_RELOAD)[/code]
Works fine on HL2 weapons and weapon_base SWEPs; make sure the base you're using doesn't have a conflicting auto-idle system that would be playing over your anim.
Finally got around to work some more on [URL="https://github.com/ZehMatt/Lambda"]Lambda[/URL]
I managed to get the first map almost working with a somewhat neat feature I believe, also episodic content mounting seems to work nicely so far.
[video]https://youtu.be/LM3kJQgGMiM[/video]
Sorry for the music, thats just how I develop.
[QUOTE=Zeh Matt;52898330]Finally got around to work some more on [URL="https://github.com/ZehMatt/Lambda"]Lambda[/URL]
I managed to get the first map almost working with a somewhat neat feature I believe, also episodic content mounting seems to work nicely so far.
[video]https://youtu.be/LM3kJQgGMiM[/video]
Sorry for the music, thats just how I develop.[/QUOTE]
Goodbye Bot02. You will be missed.
[QUOTE=bobbleheadbob;52898620]Bot02[/QUOTE]
Forever missed, already forgotten.
I think it was Bot05
Need some thoughts on these poses. They don't feel cool at all.
[t]https://i.imgur.com/bvLqNGV.jpg[/t][t]https://i.imgur.com/Q2s2iIP.jpg[/t]
[t]https://i.imgur.com/1vqA6z2.jpg[/t]
The pistol one I can't put my finger on. It's kind of the entire pose. Straighten both of the arms.
The torso on revolver should be facing a bit straighter forward, for sure. Actually, on all the poses.
The SMG one just looks like you'll lose control the second you fire the gun. Either lower the gun's position or have it further forward.
Also universally the right foot just looks uncomfortable, try a relative 45-60 degree angle to the left foot.
If someone is pointing a gun, they need to be fiercely prepared to use it. Make the guy lean into his gun a little bit. Right now it's like he's leaning back, afraid of the gun in each pose (except the pistol one)
Take a look at this silhouette for reference.
[url]https://cdn.worldvectorlogo.com/logos/counter-strike-global-offensive-2.svg[/url]
Their waste and below looks like it is at a 45 degree angle from their upper body. I feel like they should be in a forward stance rather than some weird, back leg perpendicular, stance. As for the gun grip, maybe try watching some professionals shoot various guns on YouTube and base your stance off theirs?
Our server has been crashing a lot lately (I blame garry), and I haven't been able to figure out what was crashing it. So the only possible solution to this problem I came up with is making crashes meaningless.
Any props (including their data)/properties/drugs/jobs/etc. are stored, in a database and restored if a crash happens whenever you rejoin.
[video=youtube;x9Z427OSEvw]https://www.youtube.com/watch?v=x9Z427OSEvw[/video]
At the same time I am also working on a database evolutions system (basically a copy of [URL="https://www.playframework.com/documentation/2.6.x/Evolutions"]this[/URL]), that automatically applies schema changes for me and behaves well during development.
This comes in really handy since it means I don't have to manually go into phpmyadmin (or whatever) and apply changes when I release an update. Similarily my co-developers don't always have to come to me and ask what I did to the database, and how they can fix it on their server.
If there is any demand for this I might release it in the future (unless it already exists?).
A third person mod, based off of GTA V's control scheme:
[video]https://youtu.be/lbKZYa3AXWE[/video]
This is my first serious project in Lua, having started learning it about seven months ago. At the moment, RMB triggers the "zoomed aim", so as you would expect, it doesn't entirely work well with weapons which have a secondary attack. Not entirely sure what to do about this.
To negate the issue of inconsistencies in SWEP controls (some have toggleable ADS, FoV, etc.) I'm planning on implimenting weapon presets which individually control toggleable aiming, FoV and all that jazz. Also, I'm pretty sure any seasoned Lua coder would have an aneurysm if they saw my current script :v:
Good work at making the crosshair aim at the center of the screen, tips on you!
[QUOTE=gonzalolog;52904418]Good work at making the crosshair aim at the center of the screen, tips on you![/QUOTE]
I sort of copied the method that TFA used for his third person mod, so I can't really take the credit for it (plsdontsueme)
There's a trace at the camera's position which returns a hitpos, and the player aims toward it. I want to see if there's a way to change the firing position independently of the player's eye angles somehow.
[video=youtube;5KSRosrjL8Q]http://www.youtube.com/watch?v=5KSRosrjL8Q[/video]
Orthographic DModelIcons. Why haven't we been doing this the whole time?
Benefits:
* No FOV, no stretching at the edges
* Looks like a static icon
* Doesn't look like it's floating in front of the panel
* Can't clip through the camera
* Automatic centering and scaling
They have an optional stencil effect which makes them white, shown there. You can also use pnl:SetIcon(material) to use a material instead of a model.
[url]https://www.dropbox.com/s/tfe3biay4qn94l9/gui_modelicon.lua?dl=1[/url]
I'm working on a close quarter rifle that shoots dysons.
[vid]https://cf-e2.streamablevideo.com/video/mp4/47sgd.mp4?token=1510978779-A3vCVIS%2FwSGvcR2H80X9joTWZSfK4MBSlWQzeXMGPbE%3D[/vid]
[vid]http://devultj.co.uk/i/nhrrsx.mp4[/vid]
Working on Push notifications for Monolith! Persistent notifications with dynamic actions that you can tag clientside callbacks to. It's going well so far, here's some of what it looks like.
[QUOTE=Crazy Knife;52904803]I'm working on a close quarter rifle that shoots dysons.
[vid]https://cf-e2.streamablevideo.com/video/mp4/47sgd.mp4?token=1510978779-A3vCVIS%2FwSGvcR2H80X9joTWZSfK4MBSlWQzeXMGPbE%3D[/vid][/QUOTE]
All of that view model moving and view tilting needs to be toned [B][I][U]WAAAAAAAAY[/U][/I][/B] down
[QUOTE=wauterboi;52907829]All of that view model moving and view tilting needs to be toned [B][I][U]WAAAAAAAAY[/U][/I][/B] down[/QUOTE]
I think that's part of the joke.
Notice how the song sings [B][U][I]"SWAAAAAY WITH MEEEEE, SWAAAAY WITH MEEEE..."[/I][/U][/B]
[QUOTE=mib999;52907519][vid]
Working on Push notifications for Monolith! Persistent notifications with dynamic actions that you can tag clientside callbacks to. It's going well so far, here's some of what it looks like.[/QUOTE]
Clear all would be good, cool regardless.
[QUOTE=syl0r;52902444]Our server has been crashing a lot lately (I blame garry), and I haven't been able to figure out what was crashing it. So the only possible solution to this problem I came up with is making crashes meaningless.[/QUOTE]
When I ran an RP server years back I ran into a similar crashing issue. It was the single most frustrating thing I can remember. It ended up being a player model that crashed the server. The most frustrating thing is that the logging for job changing/model changing for that action would only SOMETIMES happen. So there wasn't a clear correlation between the model and crashes in the logs. We ended up using a similar solution in the mean time.
[QUOTE=syl0r;52902444]
At the same time I am also working on a database evolutions system (basically a copy of [URL="https://www.playframework.com/documentation/2.6.x/Evolutions"]this[/URL]), that automatically applies schema changes for me and behaves well during development.
This comes in really handy since it means I don't have to manually go into phpmyadmin (or whatever) and apply changes when I release an update. Similarily my co-developers don't always have to come to me and ask what I did to the database, and how they can fix it on their server.
If there is any demand for this I might release it in the future (unless it already exists?).[/QUOTE]
You're just talking about migrations are you?
[url=https://en.wikipedia.org/wiki/Schema_migration]Schema Migration[/url]
There should be existing solutions that you can use. None of that should be Garry's mod specific.
[QUOTE=mib999;52907519][vid]http://devultj.co.uk/i/nhrrsx.mp4[/vid]
Working on Push notifications for Monolith! Persistent notifications with dynamic actions that you can tag clientside callbacks to. It's going well so far, here's some of what it looks like.[/QUOTE]
I know it's not what you're posting about, but that scarf bothers me a lot.
Try parenting it to the neck instead of the head, otherwise it'll move with the head and clip through absolutely everything like that.
[video=youtube;X58mTOjIhNc]http://www.youtube.com/watch?v=X58mTOjIhNc[/video]
New Inventory system for an upcoming serious RP project. Each of the model panels are orthographic, using the code from my previous post. You can't see it because they all look the same right now but they swap when I drag them onto one another. Certain items can only go into certain slots; these ones can only go in backpack, hands, and pockets.
The system is designed to be limited so players don't hoard unrealistic levels of stuff with them all the time.
Making stuff from Dark Souls in Garry's Mod is quite fun. There's so many things that Dark Souls has that's pretty neat, like these for example. --->
[IMG]https://i.imgur.com/2MpNjmg.png[/IMG]
Thought these things were the most adorable things in Dark Souls, especially when they waddled over to you with their eyes bobbing all over the place... But my god...
[IMG]https://i.imgur.com/HwGttdA.png[/IMG]
I was fucking wrong...
Been working on some of the tactical equipment from various Call of Duty games for a buddy, been quite fun.
also this forum change seemed quite sudden lmao
also AGAIN, maybe someone could help me with the object placement? it kinda screws up on displacements and i dunno why
I can help with the displacement issue.
Try this:
local vecDir = Angle(0, player:EyeAngles().y, 0):Forward()
local groundTrace = util.TraceLine({
start = player:GetPos() + vecDir * 10 + Vector(0, 0, 4),
endpos = player:GetPos() + vecDir * 10 - Vector(0, 0, 16),
filter = player,
mask = MASK_PLAYERSOLID
})
local ang = groundTrace.HitNormal:Angle()
ang:RotateAroundAxis(ang:Right(), -90)
local diff = player:EyeAngles().y - groundTrace.HitNormal:Angle().y
ang:RotateAroundAxis(groundTrace.HitNormal, diff)
-- 'ang' is now your correct direction on a displacement
You might need to play with the first RotateAroundAxis, but it seems to be fine for me.
aw heck, thanks a bunch! <3
Could you explain why this works? I've been having some displacement trace issues, as well, and have been trying to figure out the cause
Working on a proof-of-concept thingy to replace loading screens
I tried to comment it appropriately to show what it does, but I'm simply bad at explaining math. I just do lots of trial & error to get something to work.
local vecDir = Angle(0, player:EyeAngles().y, 0):Forward()
local groundTrace = util.TraceLine({
start = player:GetPos() + vecDir * 10 + Vector(0, 0, 4),
endpos = player:GetPos() + vecDir * 10 - Vector(0, 0, 16),
filter = player,
mask = MASK_PLAYERSOLID
})
-- Convert the normal of the hit surface into an angle that faces the direction of the surface.
local ang = groundTrace.HitNormal:Angle()
-- Rotate -90° around the surface's right-facing normal. If we don't do this, the entity faces the same direction
-- as the vertex of the displacement. We want our object to be upright!
ang:RotateAroundAxis(ang:Right(), -90)
-- Retrieve the difference in our eye angles in relation to the yaw of the displacement
local diff = player:EyeAngles().y - groundTrace.HitNormal:Angle().y
ang:RotateAroundAxis(groundTrace.HitNormal, diff)
-- Eevery plane of a displacement will have an :Up() vector which
-- will point, inclusive, between being parallel to a flat floor (z == 1) and the sky (z == 0)
-- Given that, rotating -90° along the right-facing normal will always correct the angle to not face the same direction
-- as the plane, but instead aligns the angle's :Forward() with the HitNormal's :Up() * -1 (down)
Ladies and gentlemen, I'm back with my latest shitcode fueled waste of time, energy, and bandwidth.
http://glua.tmp.bz
I also got yelled at earlier because it was loading 150MB worth of images, so I decided to scale back.
Oh sorry, I meant the trace offset selection.
Sorry, you need to Log In to post a reply to this thread.