Forum posts

Posted 16 years ago2007-08-25 20:38:47 UTC
in Hi Guys - New Weapon & Looping Sound Post #232888
Aaron haha I won't give you the code even though yes you did solve my problem. The cue points were taken out and it works great. Anyhow take your time with the weapon coding and it'll come. If you don't know C++ it's going to be alot harder but don't give up. Get a book or too or do trial and error with the code but only modify small things at a time. If I see any questions from you I'll try to help if I can :)
Posted 16 years ago2007-08-25 11:06:49 UTC
in Quick (Easy) coding question Post #232852
Make sure you modify all necessary files, your error is a result of this. When creating a weapon you need to add code to ev_hldm.cpp, evhldm.h, hl_events.cpp, hl_weapons.cpp and those are on the client side.

On the server side you also need to look at weapons.cpp and weapons.h and this is also where you need your example.cpp.

Finally make sure the client shares your example.cpp by just adding the file to the client. The last thing I think is the event file. Just copy and modify one from another weapon. Those are located in your mods files and if it's not then just create a folder called events and copy some other weapon from any mod and then edit the file.

Well I'm not writing a tutorial here so I better stop haha. Hope I could help.
Posted 16 years ago2007-08-25 10:49:20 UTC
in Hi Guys - New Weapon & Looping Sound Post #232850
Hey bud well here is what I did, I took the wave I created and copied it, then I renamed it to pl_gun3 which is what the glock uses in game. So when I loaded the game then the glock did the same thing.

I then took the original glock wave copied it back to the glock and to my new weapon which makes both sounds work great in game. The code is great which honestly sucks cause it would be a whole lot easier to fix for me.

Anyhow thank you again I'm going to spend the day fixing this wave somehow so I'll let you know what I did when I fix it. Thanks again.
Posted 16 years ago2007-08-24 22:32:56 UTC
in Tree model not loading... Post #232825
Hey bud, here's my take ... check to see if the model isn't actually intersecting with the world geometry as I too had this problem quite a few years ago. When you place the entity in Hammer what I mean is to make sure it isn't into the ground. I have had this problem too with HL2 as well. I'm not 100% sure but it only makes sense seeing that you compile looks good and you have the same model in other places of the map :) Hope I could help.
Posted 16 years ago2007-08-24 22:11:04 UTC
in Hi Guys - New Weapon & Looping Sound Post #232818
Haha anyhow the update you didn't read said the code was fine so your coding experience doesn't matter. I'm not sure about the sound stuff since I program, model, and map but thanks for the nice response :)
Posted 16 years ago2007-08-24 20:08:37 UTC
in Hi Guys - New Weapon & Looping Sound Post #232810
Ok here's an update ... I replaced the sound with the sound from the glock. I mean I did it in the code, events, and whatever and the looping goes away which leads me to believe it's the wave file I created. So on with figuring out why it loops automatically I mean don't you have to physically add cue points in or for it to loop in HL. I didn't know it could do it automatically. I recorded the sound from the firing range brought it home and mixed it down which sounds great but not sure how to take the loop away.
Posted 16 years ago2007-08-24 19:33:47 UTC
in Hi Guys - New Weapon & Looping Sound Post #232807
Hello all, I am having a bit of trouble. I coded a new weapon in the good old Half-Life SDK 2.3 and everything compiles no problem. Everything works great in game but I am wondering if I have a leak or a function problem that I just can't track down. I am new to the SDK and have limited experience with it's structure.

Anyhow the problem is ... when I fire the weapon everything works great and then the fire sound begins to loop over and over. It will stop if I switch weapons and then fire the new weapon. I did do my own custom gun shot sound but I triple checked it's format and it is correct. I've scoured my code and the code to a few other guns to check against them but all looks great. I even thought maybe the sound was a bit to long but the Pythons firing sound is longer.

Anybody else even had this problem or is there a wizz out there who might just know. Thanks in advance