• GMod - What are you working on? October 2014 (#38)
    706 replies, posted
[QUOTE=Sgt. Lulz;46315190]Speaking of HTML: Are there any functions to make Awesomium shut the hell up/pipe audio in a way that makes it possible to handle it as ingame audio and set it to a certain position, etc? I'm trying to make a TV-ish-sort-of-system too, but I don't think real-life TVs have omnipresent audio that plays inside everyone's ears at all times until they're turned off.[/QUOTE] You can control the volume via JavaScript based on distance to the entity, line of sight, etc...
PlayURL creates multiple awesomium instances?
[QUOTE=NiandraLades;46311988]I think that'd be a lot better than having a darker shade of red, every 10 units lost, so I may look into that, thank u[/QUOTE] Here is the code I use for player health colour in a gamemode of mine: [lua]local function LerpColor( delta, CF, CT ) return Color( Lerp( delta, CF.r, CT.r ), Lerp( delta, CF.g, CT.g ), Lerp( delta, CF.b, CT.b ), Lerp( delta, CF.a, CT.a )) end local white = Color(235, 235, 235, 255) local yellow = Color( 255, 208, 64 ,255 ) local red = Color( 255, 48, 0, 255 ) function drawhudstuffs() local health = LocalPlayer():Health() local HColor = white if health < 10 then HColor = red elseif health < 20 then HColor = LerpColor( (health-10)/10, red, yellow ) elseif health < 30 then HColor = yellow elseif health < 40 then HColor = LerpColor( (health-30)/10, yellow, white ) end --draw stuffs end[/lua] Its kind of confusing but it changes the colour from white, yellow then red. That reminds me that I should finish that [url=http://facepunch.com/showthread.php?t=1390094&p=44819913#post44819913]gamemode[/url], or at least put it on the workshop to fish out bugs and motivate me more.
[QUOTE=gonzalolog;46315562]PlayURL creates multiple awesomium instances?[/QUOTE] If I'm not mistaken, PlayURL has an option to treat audio as 3D audio, so it can be manipulated and positioned like any old audio source can.
I actually have an example for that too: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/sound/sound_playurl_test.lua.html[/url] I wrote that as a test / example for someone wanting to grab Youtube audio as mp3 via the website listed in there but was having trouble. So I wrote it up. You could open one stream for Youtube, another for audio as Matt suggested and it wouldn't be difficult to sync the two because the audio data-type that is returned lets you skip ahead, etc... Just get them in sync so when both audio and video are ready, then start...
got banned for uploading this to workshop maybe because the thumbnail looked like a dick [vid]http://gamerpaddy.bplaced.net/bg/gggg.webm[/vid]
[QUOTE=NiandraLades;46311599]I'm working on a gamemode based on The Ship; hunt a person while someone else hunts you, but you also have needs to attend to[/QUOTE] Been working on this on and off for about six months, and yours looks so much better than mine. There goes all motivation! :v: Seriously, though. Looking forward to this. I've wanted The Ship in GMod for so long now.
My method for dynamic looking health color shit(Because if statements are dumb): [CODE]local function HealthColor(f) local health = f:Health() local Red = 255 - (health*2.55); local Green = health*2.55; return Color(Red,Green,10) end[/CODE] This is from green to red, edit as you please.
[QUOTE=kila58;46317592]My method for dynamic looking health color shit(Because if statements are dumb): [CODE]local function HealthColor(f) local health = f:Health() local Red = 255 - (health*2.55); local Green = health*2.55; return Color(Red,Green,10) end[/CODE] This is from green to red, edit as you please.[/QUOTE] i'm pretty sure that if you're at 50% of max health for example it'll be a gross ass brown color i recommend using HSVToColor(0-100,1,1) for a very nice looking red to green transition
[QUOTE=kila58;46317592]My method for dynamic looking health color shit(Because if statements are dumb): [CODE]local function HealthColor(f) local health = f:Health() local Red = 255 - (health*2.55); local Green = health*2.55; return Color(Red,Green,10) end[/CODE] This is from green to red, edit as you please.[/QUOTE] Also, won't work well in cases where 100 is not the max health.
[media]http://youtube.com/watch?v=j6nZa8GUyjg[/media] [url]http://steamcommunity.com/sharedfiles/filedetails/?id=330382441[/url] First release of something that I made with lua. Well. I did release 2 other SWEPS, one was a shitty heavily modified cluster grenade stolen from Neurotec and another was a "firing my laser" meme incorporated into a weapon which was jury rigged from another swep that was released on toybox to prove a point. No fucking joke that laser weapon I "made" is currently on the workshop right now with like a million subscribers, [URL="http://steamcommunity.com/sharedfiles/filedetails/?id=135814880"]but another user uploaded it and claimed it was his.[/URL] [editline]24th October 2014[/editline] Should I make a thread about it so it gets removed lol because I have actual video proof that it's mine.
[QUOTE=ROFLBURGER;46317913][media]http://youtube.com/watch?v=j6nZa8GUyjg[/media] [url]http://steamcommunity.com/sharedfiles/filedetails/?id=330382441[/url] First release of something that I made with lua. Well. I did release 2 other SWEPS, one was a shitty heavily modified cluster grenade stolen from Neurotec and another was a "firing my laser" meme incorporated into a weapon which was jury rigged from another swep that was released on toybox to prove a point. No fucking joke that laser weapon I "made" is currently on the workshop right now with like a million subscribers, [URL="http://steamcommunity.com/sharedfiles/filedetails/?id=135814880"]but another user uploaded it and claimed it was his.[/URL] [editline]24th October 2014[/editline] Should I make a thread about it so it gets removed lol because I have actual video proof that it's mine.[/QUOTE] Funny enough, he got 6 pages of addons and I'm pretty sure I've seen lots of them before
[t]http://i.imgur.com/TQzFnGx.jpg[/t] tvmode is getting fancier! now with property menu support
I just wanted to make some effects. [media]http://www.youtube.com/watch?v=t5aHz-6MFic[/media]
[QUOTE=Giraffen93;46320117][t]http://i.imgur.com/TQzFnGx.jpg[/t] tvmode is getting fancier! now with property menu support[/QUOTE] "woooooh.. and no surprises" I see you have some wall with paintings on it, you should create a museum and allow people to be hung there if they win some epic events. BTW, I am currently looking for a DarkRP server to play on, would be nice if you added me so I can join when it's ready.
[QUOTE=Leystryku;46318484]Funny enough, he got 6 pages of addons and I'm pretty sure I've seen lots of them before[/QUOTE] It's Buu342, I remember him posting his Far Cry sweps on here.
[QUOTE=rebel1324;46320374]I just wanted to make some effects. [url]http://www.youtube.com/watch?v=t5aHz-6MFic[/url][/media][/QUOTE] Now hold A and try shooting again.
[QUOTE=Robotboy655;46320568]Now hold A and try shooting again.[/QUOTE] why not [media]http://www.youtube.com/watch?v=j2nqmR-hvZM[/media]
how :v:
Take this [url]http://pastebin.com/iPZL2Ba1[/url] I know the code is horrible I thought that was a good idea.
I started working on a team selector menu, which I think I might scrap entirely and go back to the design stage because I'm not sure what I don't like about it, please help me salvage it I basically traced over some icons from game-icon.net, which I think look quite nice. The circles with the numbers indicate player count [IMG]http://i.imgur.com/QGDe9gJ.png[/IMG] Had an idea, to do the images in a light grey/white colour scheme, and then when you hover over them, colour the image in red. I thought this would be really cool, but the end result is a bit disappointing and I'm not sure why. Possibly the lack of fluidity/animation? Original colours used? [IMG]http://i.imgur.com/gJhXp6b.png[/IMG] The game also pixelates the images slightly since they're not power of 2, so here is the original pngs for better reference: [IMG]http://i.imgur.com/9oLplBb.png[/IMG] [IMG]http://i.imgur.com/bnRVMq4.png[/IMG] (Photoshop pen tool can suck a fucking dick, it's trash)
Imo I think it looks fantastic. But there's an issue with the text not being centered to the circle
[QUOTE=NiandraLades;46321715](Photoshop pen tool can suck a fucking dick, it's trash)[/QUOTE] you should know to use illustrator for vectors like that as far as the design goes, "spectators" is a bigger font size than "players" is, and the circles with numbers aren't centered
[QUOTE=PortalGod;46323893]"spectators" is a bigger font size than "players" is[/QUOTE] I don't think it is. Overlay the two in an image editor and you can line up the Es or As perfectly.
Instead of coloring everything red, why not just color a portion... For the left icon just color in the splat behind the icon ( and math.sin the red so it pulses ), for the one on the right just color in the Zs or something. You could go so far as to give other parts of it different colors sort of on the theme where people use black and white for non-selected and then color on mouse-over ( fade the color in over x time ). For the icons becoming pixelated, how are you loading/drawing them? There are filters you can apply while drawing to smoothen them out.
OH, making just the background bit (blood stain & zzz) red would probably look really good, very nice idea! Should I save a copy of the png with the background like that or do it via lua? [editline]25th October 2014[/editline] Also, is there anything I can do to make the image not pixel-y since it'd probably look super odd in a power of 2 size [editline]25th October 2014[/editline] [QUOTE=PortalGod;46323893]you should know to use illustrator for vectors like that as far as the design goes, "spectators" is a bigger font size than "players" is, and the circles with numbers aren't centered[/QUOTE] I don't actually use Illustrator at all, although I feel I sort of should do I hadn't noticed the text different thing, actually. If anything, spectators should be smaller since it's more letters :v: Will sort out the circle things later on, anyway
[QUOTE=NiandraLades;46324247]I don't actually use Illustrator at all, although I feel I sort of should do I hadn't noticed the text different thing, actually. If anything, spectators should be smaller since it's more letters :v: Will sort out the circle things later on, anyway[/QUOTE] Illustrator is actually a lot more straight-forward than it looks. Plus, it makes vector/shapey drawings so much easier to handle and scale. You should definitely look into it.
making some customization options for players -they can edit their hats individually, within reason. [img_thumb]http://i3.minus.com/i5wufEufLMVuv.PNG[/img_thumb]
[QUOTE=NiandraLades;46324247]I don't actually use Illustrator at all, although I feel I sort of should do I hadn't noticed the text different thing, actually. If anything, spectators should be smaller since it's more letters :v: Will sort out the circle things later on, anyway[/QUOTE] once you get the hang of it it's the best thing ever, I hardly use photoshop anymore just because illustrator is so much easier to use for me the general rule is that photoshop should be used for images and illustrator for simple shapes, vectors, anything that will need to be seen at large resolutions, etc
[t]http://i.imgur.com/GFPtzA4.jpg[/t] dynamic lights are wonderful
Sorry, you need to Log In to post a reply to this thread.