Give Me Ya Pretzels Posted September 3, 2018 i was wondering how would you make a sound play when you select a weapon example: you press the "6" key and select the rocket launcher and a sound plays. how would you do that thx. 0 Share this post Link to post
Aquila Chrysaetos Posted September 3, 2018 Actor NewRocketLauncher : RocketLauncher replaces RocketLauncher { Weapon.UpSound "Weapons/LauncherUp" } In the decorate text. Then in the sndinfo: Weapons/LauncherUp DSLAUNUP 0 Share this post Link to post
Give Me Ya Pretzels Posted September 3, 2018 (edited) i tried doing it, only worked if i picked up the weapon. i need to have a sound play each time the player selects the weapon another example: you press 4 for the chaingun and a sound plays Edited September 3, 2018 by teamswag 0 Share this post Link to post
Aquila Chrysaetos Posted September 3, 2018 Weapon.UpSound is the sound played when the weapon is raised. What I put there is correct. Inventory.PickupSound is the sound played when the item is picked up. The code I provided will make the sound DSLAUNUP play when the rocket launcher is selected, but I did not provide the sound itself. 1 Share this post Link to post
Give Me Ya Pretzels Posted September 3, 2018 (edited) i gonna test it again if i came off as a little rude i am sorry 1 Share this post Link to post
Give Me Ya Pretzels Posted September 3, 2018 (edited) i tried again and it still didn't work. when you first messaged me with the code you gave. i copyed and pasted the code and modyfied to fit the sound i needed, here's what i put in decorate: Actor NewRocketLauncher : RocketLauncher replaces RocketLauncher { Weapon.UpSound "Weapons/LauncherUp" } in sndinfo: Weapons/LauncherUp METAL_SL the sound file name i used METAL_SL.wav 1 Share this post Link to post
Aquila Chrysaetos Posted September 3, 2018 Then the sound is the problem. Everything written there is perfectly correct because it comes from code that I know for a fact works. If you check the ZDoom Wiki page for the chainsaw, you'll see that the sound that plays when it's selected is its UpSound. 0 Share this post Link to post
Give Me Ya Pretzels Posted September 3, 2018 for some reason, after trying that out, for some reason i am getting this error Script error, "map1.wad:DECORATE" line 4: Unexpected character: ï (ASCII -17) 0 Share this post Link to post
Aquila Chrysaetos Posted September 3, 2018 There's a character in your decorate text that ZDoom is finding where there shouldn't be anything on line four, it looks like. It's probably outside the brace, which would cause that error, though I don't see where that character would've come from. 0 Share this post Link to post
Give Me Ya Pretzels Posted September 3, 2018 here is what i put in decorate Actor NewRocketLauncher : RocketLauncher replaces RocketLauncher { Weapon.UpSound "Weapons/LauncherUp" } i still don't know why it says the error because there is still nothing also here is a screenshot 0 Share this post Link to post
Nevander Posted September 3, 2018 Don't forget you need to replace the player class to include the new weapon too, then add the class to playerclasses in MAPINFO. Everyone always forgets this part! 2 Share this post Link to post
Aquila Chrysaetos Posted September 3, 2018 I don't see why it's spitting that error. I've never had this happen before. Try rewriting it instead of copy-pasting, then remove the "old" code and see if that fixes the error. Another thing I hadn't considered is you need to be able to select the weapon, so you can create a keyconf text file and write this: setslot 5 NewRocketLauncher Or you can go in the console and type "use NewRocketLauncher" and you'll switch to it. 1 Share this post Link to post
Aquila Chrysaetos Posted September 3, 2018 You don't need one. The default player class can use any weapon, and my keyconf solution above will allow you to switch to the new launcher, but not the old one. 0 Share this post Link to post
Give Me Ya Pretzels Posted September 3, 2018 and also i still get the error 0 Share this post Link to post
Gato606 Posted September 3, 2018 Are you sure you're using the file you edited and not a copy? It happened to me once As for the sounds, and since you're using a WAD instead of PK3, do you have the sound file outside any type of marker? 0 Share this post Link to post
Give Me Ya Pretzels Posted September 3, 2018 i don't have any marker for the sound at all. and also it is not a copy 0 Share this post Link to post
Aquila Chrysaetos Posted September 3, 2018 You don't need markers for sound files, text files, or maps. I don't know why you're getting this error, but I'm thinking that @Gez will very likely be able to help. 1 Share this post Link to post
Give Me Ya Pretzels Posted September 4, 2018 i haven't got a responce yet. 0 Share this post Link to post
Give Me Ya Pretzels Posted September 4, 2018 i actually figured out the problem. but i need to know. what is the name of chaingun in the game. and also i need to know what is the name that goes with "Weapons/[insertname]Up" 0 Share this post Link to post
Nevander Posted September 5, 2018 Logical sound names are totally arbitrary. 0 Share this post Link to post
Aquila Chrysaetos Posted September 5, 2018 I picked sound info names that made sense to me, so the sndinfo I use for the vanilla weapons is as such: Weapons/M9Up Weapons/ShotgunUp Weapons/DBShotgunUp Weapons/ChaingunUp Weapons/LauncherUp Weapons/PlasmaUp Weapons/BFGUp From top to bottom, I made these for the pistol, single shotgun, super shotgun, chaingun, rocket launcher, plasma rifle, and BFG. 0 Share this post Link to post
Gato606 Posted September 15, 2018 On 9/4/2018 at 4:30 PM, teamswag said: i actually figured out the problem. but i need to know. what is the name of chaingun in the game. and also i need to know what is the name that goes with "Weapons/[insertname]Up" The "regular" name for the chaingun (fire sound) according to ZDoom-sndinfo.txt Is: "weapons/chngun" 0 Share this post Link to post