Well since you're already rendering a 3d2d panel why not just do the text drawing within the 3d2d context?
[editline]6th May 2015[/editline]
Ah, fuck. I don't have anything to labeling with atm.
[QUOTE=hexpunK;47668344]-snip-[/QUOTE]
use [CODE]LocalPlayer():GetActiveWeapon().Primary.ClipSize[/CODE] to get max magazine capacity
[t]https://dl.dropboxusercontent.com/u/17839069/C_298.png[/t]
I found an extra, hidden directory. Whatta' ya' know? I wonder what's inside...
Must be hidden treasure!
[QUOTE=Llamalord;47658793]Basewars was an edit of Light RP 2009 by Rick Dark (The Original Dark RP) and then modified into RPDM by partyvan and then edited by a 13 year old version of myself. The networking and coding in that gamemode still makes me cringe, it was all done in NWVars.[/QUOTE]
Shout out to me for constantly hammering you about how poorly done the gamemode was (Y)
Made a nice Alien Egg from the 'Alien' universe.
Maybe needs some more sound effects, at least it works for now.
[video=youtube;SGviBxGgRH0]http://www.youtube.com/watch?v=SGviBxGgRH0[/video]
[QUOTE=polivlas;47669898]use [CODE]LocalPlayer():GetActiveWeapon().Primary.ClipSize[/CODE] to get max magazine capacity[/QUOTE]
This just seems to return nil annoyingly. I suppose this information isn't available outside of the SWEP environment itself or just doesn't exist on the built in weapons?
I've moved the whole thing to 3D2D now anyway because just using the Cam3D was pretty fucking dumb. This is much easier!
[QUOTE=hexpunK;47671167]This just seems to return nil annoyingly. I suppose this information isn't available outside of the SWEP environment itself or just doesn't exist on the built in weapons?
I've moved the whole thing to 3D2D now anyway because just using the Cam3D was pretty fucking dumb. This is much easier![/QUOTE]
doesnt work on anything thats not a SWEP
[QUOTE=hexpunK;47671167]This just seems to return nil annoyingly. I suppose this information isn't available outside of the SWEP environment itself or just doesn't exist on the built in weapons?
I've moved the whole thing to 3D2D now anyway because just using the Cam3D was pretty fucking dumb. This is much easier![/QUOTE]
Check if the curweapon IsScripted(), if so use that code snippet, else have a variable saved which if the current clip is larger than the number saved to the variable, set the variable to the clip so that once the player initially switches they'll have the full clip and the variable will be set to that
[QUOTE=hexpunK;47671167]This just seems to return nil annoyingly. I suppose this information isn't available outside of the SWEP environment itself or just doesn't exist on the built in weapons?
I've moved the whole thing to 3D2D now anyway because just using the Cam3D was pretty fucking dumb. This is much easier![/QUOTE]
I found this very annoying, so I made a little utility library so I don't have to worry about what I'm calling it on, it will give me the values I want.
[url]https://dl.dropboxusercontent.com/s/yyqfjzi3cy5262p/2015-05-06_11-04-00.txt?dl=0[/url]
[QUOTE=BigBadWilly;47663122]Plz Man
On Topic: I like the look of those weed plants, Custom Modeled I assume?[/QUOTE]
Yessir
As to everyone else, i'll get some other design going.
[QUOTE=hexpunK;47671167]This just seems to return nil annoyingly. I suppose this information isn't available outside of the SWEP environment itself or just doesn't exist on the built in weapons?
I've moved the whole thing to 3D2D now anyway because just using the Cam3D was pretty fucking dumb. This is much easier![/QUOTE]
I set up a table for the default weapons with their clip sizes, then check to see if its a scripted weapon or not. If not, I reference the table.
[QUOTE='[CLRP]extra;47671087']Made a nice Alien Egg from the 'Alien' universe.
Maybe needs some more sound effects, at least it works for now.
[video=youtube;SGviBxGgRH0]http://www.youtube.com/watch?v=SGviBxGgRH0[/video][/QUOTE]
Mostly unrelated, but if that is the same model I think it is, then this might be of use:
[code]if CLIENT then
SWEP.RenderTarget = GetRenderTarget( "avp_pulserifle_ammo", 64, 64, false )
surface.CreateFont( "7 SEGMENTAL DIGITAL DISPLAY", 50, 400, true, false, "7segment", false, false )
local mat
mat = Material( "models/m41a/pulse_rifle_ammo" )
mat:SetMaterialTexture( "$basetexture", SWEP.RenderTarget )
mat = Material( "models/m41a/pulse_rifle_ammo_zero" )
mat:SetMaterialTexture( "$basetexture", SWEP.RenderTarget )
mat = Material( "avp_pulserifle_ammo" )
mat:SetMaterialVector( "$tint", Vector( 1.2, 0, 0 ) )
local color_red = Color( 189, 000, 000, 255 )
end
function SWEP:ViewModelDrawn( )
local old
old = render.GetRenderTarget( )
render.SetRenderTarget( self.RenderTarget )
render.SetViewPort( 0, 0, 64, 64 )
render.Clear( 255, 000, 000, 255, true )
cam.Start2D( )
surface.SetDrawColor( color_black )
surface.DrawRect( 0, 00, 64, 7 )
surface.DrawRect( 0, 57, 64, 7 )
draw.DrawText( string.format( "%02d", self:Clip1( ) ), "7segment", 0, 7, color_black, TEXT_ALIGN_LEFT )
cam.End2D( )
render.SetViewPort( 0, 0, ScrW( ), ScrH( ) )
render.SetRenderTarget( old )
end[/code]
Replace font with a seven segment font of your choice ( [url=http://www.dafont.com/7-segmental-digital-display.font]I like this one[/url] ), preferably one that is white text on a black background.
This will make it so the ammo counter on the side of the model works. The code is hilariously old ( from 2011 ), but the concept is there.
[QUOTE=vexx21322;47671614]I found this very annoying, so I made a little utility library so I don't have to worry about what I'm calling it on, it will give me the values I want.
[url]https://dl.dropboxusercontent.com/s/yyqfjzi3cy5262p/2015-05-06_11-04-00.txt?dl=0[/url][/QUOTE]
That seems incredibly useful...I was considering writing something similar myself because there's a ton of boilerplate floating around my code right now.
Pretty much finished the notification system for my Cards Against Humanity addon.
[video=youtube;8pcj3zXcWgw]http://www.youtube.com/watch?v=8pcj3zXcWgw[/video]
Do any of you know why the little triangle only shows up on the last notification?
[URL="https://github.com/Starfox64/cards-against-humanity/blob/master/lua/cah/vgui/cl_notification.lua"][B]cl_notification.lua[/B][/URL]
I was debugging my lightsaber hit detection, when suddenly:
[img]http://i.imgur.com/qgLLVyW.gif[/img]
[media]http://www.youtube.com/watch?v=Zd1MfTD69qg[/media]
Yay stencils, like 3-4 of them .. and had to add two more math functions to make the effect.
Towers also now copy the ground texture (Unless if its a displacement surface or nodraw texture)
Now to the bots and their AI .. not really sure how I should make them act.
Ya'll didn't like my lack of explanation as to what the hell Bees actually is.
Here's a video, then:
[video=youtube;A58v5aYzACo]http://www.youtube.com/watch?v=A58v5aYzACo[/video]
Collision detection is hard.
sorry but bees aren't these monsters that fly and attack people?
[QUOTE=MadParakeet;47680668]Ya'll didn't like my lack of explanation as to what the hell Bees actually is.
Here's a video, then:
[url]http://www.youtube.com/watch?v=A58v5aYzACo[/url]
Collision detection is hard.[/QUOTE]
Reminds me of one of my first Minecraft mods: :v:
[t]http://i.imgur.com/YcoHQfd.png[/t]
That video explains nothing though, all we see is thousands of cubes, nothing special?
[QUOTE=MadParakeet;47680668]-vague video-[/QUOTE]
[QUOTE=Robotboy655;47680960]:words:[/QUOTE]
Maybe he's actually making boxes and not cubes, and is calling all of us dumb because boxes.
Wait wait, we can go more in depth. All the cubes- i mean boxes- have rating icons on them. Maybe they represent something? 4*6 Lua King = 1 Box?
Yeah, no. The video doesn't explain anything
[QUOTE=swadicalrag;47681093]Maybe he's actually making boxes and not cubes, and is calling all of us dumb because boxes.
Wait wait, we can go more in depth. All the cubes- i mean boxes- have rating icons on them. Maybe they represent something? 4*6 Lua King = 1 Box?
Yeah, no. The video doesn't explain anything[/QUOTE]
Well it does explain that he likes stars, look at the textures! They all got stars
Steeze? I've never heard of him. Well, out of curiosity, I found this. Anyone know when this webpage is from?
[URL="http://www.imperialservers.org/forums/m/19354162/viewthread/15460655-banned-by-infintuple-grillsteam0142459072-permanently-noice-try"]http://www.imperialservers.org/forums/m/19354162/viewthread/15460655-banned-by-infintuple-grillsteam0142459072-permanently-noice-try[/URL]
NOOOOO Wrong thread, sorry :\(mistakes happen...)
Does this seem to be too OP?
[video=youtube;N-eDLeGYVWY]http://www.youtube.com/watch?v=N-eDLeGYVWY[/video]
[QUOTE=baldursgate3;47681152]Does this seem to be too OP?
[video=youtube;N-eDLeGYVWY]http://www.youtube.com/watch?v=N-eDLeGYVWY[/video][/QUOTE]
If that's game lag, maybe you should find a way to reduce the most explosions. Also, that is very OP in anything indoors.
[QUOTE=MadParakeet;47680668]Ya'll didn't like my lack of explanation as to what the hell Bees actually is.
Here's a video, then:
Collision detection is hard.[/QUOTE]
Looks like you're doing a minecraft kind of thing, or at least something with voxels. Looks like you're testing drawing many of them and collisions. You can build a world with them later.
Am I right?
Started playing around with nextbots again, oh how I love them.
[video=youtube;82nB_PVbY7U]http://www.youtube.com/watch?v=82nB_PVbY7U&feature=youtu.be[/video]
[QUOTE=FPtje;47682756]Looks like you're doing a minecraft kind of thing, or at least something with voxels. Looks like you're testing drawing many of them and collisions. You can build a world with them later.
Am I right?[/QUOTE]
[QUOTE=MadParakeet;47680668]Ya'll didn't like my lack of explanation as to what the hell Bees actually is.
Here's a video, then:
Collision detection is hard.[/QUOTE]
And that guessing game is intended to increase the fame of that project, isn't it?
[QUOTE=Grocel;47683868]And that guessing game is intended to increase the fame of that project, isn't it?[/QUOTE]
No, I was being vague so I could be a slightly bigger douche later. FPtje got it though, more or less. It's a general purpose voxel module. Going through with douchery part 2 anyway, should be ready by the end of the weekend at this rate.
[QUOTE=MadParakeet;47684618]No, I was being vague so I could be a slightly bigger douche later. FPtje got it though, more or less. It's a general purpose voxel module. Going through with douchery part 2 anyway, should be ready by the end of the weekend at this rate.[/QUOTE]
I Would love to see where this project goes. I once made a voxel engine with unity and c#. It was simple, could remove/place blocks and it had a chunk based loading system. I Used the marching cubes algorithm to draw the mesh around the generated voxels. Also perlin noise is a great algorithm for generating landscapes. Simplex noise is less detailed but much more efficient. Anyway good luck!
[url]http://en.wikipedia.org/wiki/Marching_cubes[/url]
[url]http://en.wikipedia.org/wiki/Perlin_noise[/url]
[url]http://en.wikipedia.org/wiki/Simplex_noise[/url]
And also useful for creating bioms/vallys
[url]http://en.wikipedia.org/wiki/Voronoi_diagram[/url]
Hope this helps you in some way
[url=https://github.com/PortalGod/gANL]here[/url]'s the module I used back when I was doing my minecraft gamemode, it's a little weird but really good once you get used to it
Sorry, you need to Log In to post a reply to this thread.