GMod - What are you working on? October 2014 (#38)
706 replies, posted
Seems way out of proportion compared to the car
[QUOTE=Nak;46169293]Temperately using Vein's rain-material until I've made my own[/QUOTE]
Prepare for a call from my lawyers
[QUOTE=Disseminate;46174306]Prepare for a call from my lawyers[/QUOTE]
[b]Temperately[/b] .. on top of that I'm only using the path to the material .. you can't copyright words .. unless you own candy-crush. :P
Anyways working on a new roleplay gamemode, trying to get the GUI done
[img]http://puu.sh/c33nv/86d6fa003d.png[/img]
[QUOTE=Disseminate;46174390]Anyways working on a new roleplay gamemode, trying to get the GUI done
[img]http://puu.sh/c33nv/86d6fa003d.png[/img][/QUOTE]
This is slander! Chairman Mao didn't have a moustache, you filthy westerner perpetuator of the four olds!
Working on a custom drug mod for my community server, here's the bong you load drugs into:
The amount of smoke you exhale depends on how long you took a hit.
[vid]http://beigelands.com/files/bong2.webm[/vid]
[IMG]http://www.facepunch.com/fp/ratings/weed.png[/IMG] Smarked x 2
[QUOTE=bluebull107;46169263]If you wanna keep trying to draw attention to yourself by criticizing me, then I suggest you actually make something worth using...otherwise youre just drawing out more drama and not being very helpful.[/QUOTE]
Can you please stop causing so much drama in this thread?
[QUOTE=Mors Quaedam;46174836]Can you please stop causing so much drama in this thread?[/QUOTE]
Yeah, blame me...not the person who brought it up. But nevertheless, ill leave you alone.
[QUOTE=Blasphemy;46174614]Working on a custom drug mod for my community server, here's the bong you load drugs into:
The amount of smoke you exhale depends on how long you took a hit.
[/QUOTE]
Now you just need a joint that you can smoke on the go and be able to pass to other players.
[QUOTE=bluebull107;46175121]Yeah, blame me...not the person who brought it up. But nevertheless, ill leave you alone.[/QUOTE]
Read Mors' title
[QUOTE=Disseminate;46174390]Anyways working on a new roleplay gamemode, trying to get the GUI done
[IMG]http://puu.sh/c33nv/86d6fa003d.png[/IMG][/QUOTE]
Did you use stencils to get a partial blur just to cover the area behind the GUI?
[QUOTE=bluebull107;46175121]Yeah, blame me...not the person who brought it up. But nevertheless, ill leave you alone.[/QUOTE]
Just leave, nobody likes you and you don't contribute to this topic at all... just spreading cancer.
Just don't respond to him whenever he posts.
[QUOTE=Netheous;46175197] you don't contribute to this topic at all... just spreading cancer.[/QUOTE]
Im making a swep that shoots rockets at a target from the sky (Kinda like artillery) but at the moment I cant figure out how to change the angle that the rockets come in from.
Edit:
I tried contributing :D didnt really work out.
[QUOTE=Netheous;46175197]Did you use stencils to get a partial blur just to cover the area behind the GUI?[/QUOTE]
surface.DrawTexturedRectUV
I knew you guys hated bluebull but 7 dumb ratings on a simple SWEP question? o_o
[QUOTE=Disseminate;46175747]surface.DrawTexturedRectUV[/QUOTE]
I figured that much, but I couldn't find a proper vmt variable to produce such an effect.
[QUOTE=bluebull107;46175270]Im making a swep that shoots rockets at a target from the sky (Kinda like artillery) but at the moment I cant figure out how to change the angle that the rockets come in from.
Edit:
I tried contributing :D didnt really work out.[/QUOTE]
Well you set your rocket's position to somewhere in the sky right? Try setting the rocket's angles as well.
[QUOTE=RonanZer0;46175787]I knew you guys hated bluebull but 7 dumb ratings on a simple SWEP question? o_o[/QUOTE]
[QUOTE=bluebull107;46175270]Im making a swep that shoots rockets at a target from the sky (Kinda like artillery) but at the moment I cant figure out how to change the angle that the rockets come in from.
Edit:
I tried contributing :D didnt really work out.[/QUOTE]
Get the world position of the target (probably just use your eye trace for this) and then in a parenthetical statement, subtract the origin vector of the "rocket spot" in your skybox from it. Then, convert the resulting vector into an angle, and use the SetAngles method on your rocket so it points in the right direction. Then, multiply the amount of velocity to be applied to the rocket by the rocket's directional vector, obtainable by using GetAngles():Forward() or simply by using a normalized version of the directional vector you calculated earlier.
basically, you need
YourRocketObject:SetAngles((TargetPosition - RocketOrigin):Angle())
YourRocketObject:SetVelocity( 420 * YourRocketObject:GetAngles():Forward() )
and that should do the trick.
[QUOTE=Netheous;46175997]I figured that much, but I couldn't find a proper vmt variable to produce such an effect.[/QUOTE]
[url]http://www64.zippyshare.com/v/74969868/file.html[/url]
they should work, but haven't used them in ages.
Here is the tool to manage a 0.0.0 version... Pretty simple and straight forward, but may be useful for those learning to work with Shell / Batch files such as making "helper" Batch files to handle a specific task instead of over complicating the main script. I haven't done a whole lot with Batch before, so I'm sure some of the things I did could be done differently or better in some way. It'll be a project I'm learning on and releasing for those wanting a version control system without needing to manually find and edit the txt each time.
[url]https://bitbucket.org/Acecool/version-updater-tool[/url] + SourceTree is a good combo.
If you spot anything that sucks, or could be done better, please let me know! ( File manipulation I'm sure there are other ways, using pipe may not be the best method [ for one it is slow, but the only way I figured out how to write a stripped/trimmed string to the file ] ).
[QUOTE=MadParakeet;46168424]I also have this wonderful, cringe-worthy snippet I wrote because I couldn't figure out how to get the worldspawn (or any other) CBaseEntity:
[code]
IPhysicsEnvironment* env = source_physics->GetActiveEnvironmentByIndex(0);
int obj_count;
const IPhysicsObject** objects = env->GetObjectList(&obj_count);
CBaseEntity* ownerEnt=NULL;
for (int i = 0; i < obj_count; i++) {
CBaseEntity* ent = (CBaseEntity*)objects[i]->GetGameData();
if (ent != NULL && strcmp(ent->GetClassname(), "worldspawn") == 0) {
ownerEnt = ent;
break;
}
}
[/code][/QUOTE]
Is this a lua module? If so you can use a lua modules dll as a source plugin dll at the same time. Take a look at mp/src/utils/serverplugin_sample/serverplugin_empty.cpp and implement it into your lua module then you can create a vdf to load it as a source plugin. Keep in mind source plugins only load on srcds dedicateds. This is how I get access to all of the interfaces in my modules easily.
Then with the engine interface you can use PEntityOfEntIndex to get the edict of an entity by index which can be converted into a cbaseentity with.
[code]
edict_t *ent = engine->PEntityOfEntIndex( int );
IServerUnknown *unk = ent->GetUnknown();
if( unk ){
CBaseEntity *ent = unk->GetBaseEntity();
}
[/code]
And since worldspawn is (always?) 0 it should work how you want. And maybe faster.
[QUOTE=Cardcapture1;46175131]Now you just need a joint that you can smoke on the go and be able to pass to other players.[/QUOTE]
Does anyone know how to pose the viewmodel hands without making a completely new model? If so, I'll totally make one. I'll also make cigarettes that work the same way.
Another useful function
[code]
local function tableToString( tbl, encloseKeys, alignValues, args )
if not encloseKeys then
encloseKeys = false
end
if not alignValues then
alignValues = false
end
if not args then
args = {}
end
if not args.name then
for k, v in pairs( _G ) do
if v == tbl and k then
args.name = k
break
end
end
if not args.name then
for i = 1, 10000 do
local k, v = debug.getlocal( 2, i, 1 )
if v == tbl and k then
args.name = "local " .. k
break
end
end
if not args.name then
args.name = "local myTable"
end
end
end
local s = ""
if not args.padding then
args.padding = 0
elseif args.padding > 0 then
s = string.rep( "\t", args.padding )
end
if not args.l then
args.l = {}
args.l[args.padding] = 0
end
s = s .. args.name
if alignValues then
s = s .. string.rep( " " , args.l[args.padding] - args.name:len() )
end
s = s .. " = "
local tv = type( tbl )
if tv == "table" then
local function pairsSortedByKeys( t )
local t2 = {}
for k,v in pairs( t ) do
table.insert( t2, k )
end
table.sort( t2,
function( a, b )
local na, nb = tonumber( a ), tonumber( b )
if na and nb then
return na < nb
end
return tostring( a ) < tostring( b )
end
)
local iter, s, i, k = ipairs( t2 )
return function()
i, k = iter( s, i )
if not i then
return nil
end
return k, t[k]
end
end
local padding = string.rep( "\t", args.padding )
s = s .. "\n" .. padding .. "{\n"
args.padding = args.padding + 1
for k, v in pairs( tbl ) do
local nk = tonumber( k )
local sk = tostring( k )
local l = nk and ("[" .. sk .. "]"):len() or ( ( encloseKeys or sk:find(" ") ) and ("[\"" .. sk .. "\"]"):len() or sk:len() )
if l > (args.l[args.padding] or 0) then
args.l[args.padding] = l
end
end
for k, v in pairsSortedByKeys( tbl ) do
local nk = tonumber( k )
local sk = tostring( k )
args.name = nk and ("[" .. sk .. "]") or ( ( encloseKeys or sk:find(" ") ) and ("[\"" .. sk .. "\"]") or sk )
s = s .. tableToString( v, encloseKeys, alignValues, args ) .. ",\n"
end
args.padding = args.padding - 1
s = s .. padding .. "}"
elseif tv == "number" or tv == "boolean" or tonumber( tbl ) then
s = s .. tostring( tbl )
elseif tv == "string" then
s = s .. string.format( "%q", tbl )
else
local sv = tostring( tbl )
s = s .. ( sv and sv or ("\"[" .. tv .. "]\"") )
end
return s
end
[/code]
The output string can be directly copy/pasted into a Lua script, or loadstring'ed. It's not perfect but it will suffice in most (simple) cases ;)
Here is a demo of its usage and ouput: [url]http://codepad.org/TBjyrv56[/url]
[QUOTE=Disseminate;46174390]Anyways working on a new roleplay gamemode, trying to get the GUI done
[t]http://puu.sh/c33nv/86d6fa003d.png[/t][/QUOTE]
Reminds me old gamemode Epidemic
[QUOTE=Netheous;46175997]I figured that much, but I couldn't find a proper vmt variable to produce such an effect.[/QUOTE]
Look at pp/blurscreen
I was working on my [URL="http://facepunch.com/showthread.php?t=1383796"]radio[/URL] today and noticed by accident that some formats such as aac+ or mp4a does get played by BASS if the channel doesn't have 3D sound enabled while they don't if 3D is enabled. So as it seems format support is depending on that 3D option.
Now I added a fallback beside other stuff to the radio, which retries to play a stream without 3D when the 3D one fails with error code 41 (unsupported format). So it plays fragradio.co.uk which is streamed in mp4a in semi 3D now.
[QUOTE=DEFCON1;46178036]Another useful function[/QUOTE]Nice work, you could also use luadata for this, it has support for pretty much everything (vectors, angles, colors) etc., too.
[URL]https://github.com/CapsAdmin/pac3/blob/master/lua/pac3/core/client/libraries/luadata.lua[/URL]
Only thing it lacks is the unenclosed keys and an option for manual padding
Working on a HUD for my upcoming server.
[t]https://dl.dropboxusercontent.com/u/67402346/ShareX/2014/10/2014-10-08_12-07-03.jpg[/t]
Just need to get the bars and ammo implimented and everything updating correctly. Only the ping and FPS really update.
[QUOTE=LUModder;46183777]Working on a HUD for my upcoming server.
[t]https://dl.dropboxusercontent.com/u/67402346/ShareX/2014/10/2014-10-08_12-07-03.jpg[/t]
Just need to get the bars and ammo implimented and everything updating correctly. Only the ping and FPS really update.[/QUOTE]
Looking quite good, BUT i imagine that a lot of information is missplaced for Higher Resolutions.
Also i personally aren't an fan of the silkicons that are coming with gmod. Try to make something more fitting to your overall theme :)
[QUOTE=LUModder;46183777]Working on a HUD for my upcoming server.
[t]https://dl.dropboxusercontent.com/u/67402346/ShareX/2014/10/2014-10-08_12-07-03.jpg[/t]
Just need to get the bars and ammo implimented and everything updating correctly. Only the ping and FPS really update.[/QUOTE]
The text and everything is so tiny I can barely read it, let alone while playing at a high res.
Sorry, you need to Log In to post a reply to this thread.