| Blockland Forums > Modification Help |
| Playing A Sound |
| << < (2/3) > >> |
| Swollow:
--- Quote from: jes00 on March 20, 2012, 03:22:02 PM ---Can other people hear an items sound when it's equipped? --- End quote --- in the weapons state section --- Code: ---stateSound[0] = weaponSwitchSound; --- End code --- remove this line --- Code: ---stateScript[0] = "onActivate"; --- End code --- add this line then add this --- Code: ---function ImageName::onActivate(%this,%obj,%slot) { %Client = %Obj.Client; %Client.play2D(SoundDatablock) Parent::onActivate(%this,%obj,%slot); } --- End code --- |
| jes00:
--- Quote from: swollow on March 21, 2012, 09:14:23 PM ---in the weapons state section --- Code: ---stateSound[0] = weaponSwitchSound; --- End code --- remove this line --- Code: ---stateScript[0] = "onActivate"; --- End code --- add this line then add this --- Code: ---function ImageName::onActivate(%this,%obj,%slot) { %Client = %Obj.Client; %Client.play2D(SoundDatablock) Parent::onActivate(%this,%obj,%slot); } --- End code --- --- End quote --- Why not just answer my question? |
| YourBuddyBill:
--- Quote from: jes00 on March 20, 2012, 03:22:02 PM ---Can other people hear an items sound when it's equipped? --- End quote --- Normally yes, which kinda ruins a lot of stealth missions. More than once I've heard someone pull a weapon, and I whipped around and shot them dead. |
| jes00:
--- Quote from: YourBuddyBill on March 26, 2012, 08:54:13 AM ---Normally yes, which kinda ruins a lot of stealth missions. More than once I've heard someone pull a weapon, and I whipped around and shot them dead. --- End quote --- So how would I make it play a sound to everyone within the same radius as a normal weapon's? |
| YourBuddyBill:
--- Quote from: jes00 on March 26, 2012, 09:39:18 AM ---So how would I make it play a sound to everyone within the same radius as a normal weapon's? --- End quote --- The line that he said to replace is the line that plays the normal weapon switch sound. Note that a few weapons do not have switch sounds either due to scripting errors or stealth reasons. |
| Navigation |
| Message Index |
| Next page |
| Previous page |