#making a swep, and the sound wont play when i do this

1 messages · Page 1 of 1 (latest)

hollow cargo
#

sound exists here.

#
owner:EmitSound("sound/zhonya.wav", 100, 100)
hollow cargo
#

whenever i do play zhonya.wav in console it works

#

like i hear the sound

#

not sure why it doesn't when i call it in the script

#

i guess i would need to add the whole filepath in the script? , but how would that work if iw anted to upload it to the workshop

sterile bay
#

Just do zhonya.wav not sound/zhonya.wav

hollow cargo
#

yeah i got it to work lol

#

thank u

#

if i wanted to add it to workshop

#

would i pack it like that ?

sterile bay
#

Yep

hollow cargo
#

awesome

sterile bay
#

Yeah you answered your own question when you said you ran it and console

hollow cargo
#

good way of learning

hollow cargo
#

hey, @sterile bay sorry to ping

if i wanted to add a color to the light what would i do ?

my current code:

        local light = ents.Create("light_dynamic")
        light:SetPos(owner:GetPos())
        light:SetParent(owner)
        light:SetKeyValue("distance", "200")
        light:SetKeyValue("brightness", "2")
        light:SetKeyValue("style", "0")
        light:SetKeyValue("pattern", "0")
        light:SetKeyValue("lightcolor", "255 223 0")
        light:Spawn()
        light:Activate()   
#

i tried light:SetKeyValue("lightcolor", "255 223 0") but it didn't work lole

sterile bay
#

Isn't it just :SetColor(Color(255,255,255,255))

hollow swift
#

So you can either do:

light:SetKeyValue("_light", "255 223 0")```
or
```lua
light:Fire("color", "255 223 0")```
hollow swift
#

You can do light:SetColor(Color(255, 223, 0)) as well

sterile bay
#

😉

umbral heart
#

wait how did u make a weapon? mine just doesn't work when i perfectly followed a tutorial (i even downloaded the same program they used to code with)

hollow cargo
#

@sterile bay hey do you know the default path for the gmod silk icons ? i dont think the wiki one is correct it's giving me a missing texture

sterile bay
#

silk?

hollow cargo
#
#

when i call it in my script it comes up as a checkered missing

#

ah i got it sorery im dumb

hollow swift
hollow cargo
#

i just can't figure it out tbh

hollow swift
#

I'm not the best with HUDs and stuff so I'm not the guy to ask, unfortunately

hollow cargo
#

all good

cyan frost
#

I know this is old

#

but thanks this saved me

cyan frost