Raised This Month: $51 Target: $400
 12% 

[TF2] Dispenser Music (v0.4.1, 2014-05-02)


Post New Thread Reply   
 
Thread Tools Display Modes
redjazz96
Junior Member
Join Date: Jul 2013
Old 09-25-2013 , 08:10   Re: [TF2] Dispenser Music (v0.2.0, 2013-06-09)
Reply With Quote #21

I'll check those problems out, and I'll add them with the next update; I've been swamped with assignments the past few weeks, but I should be able to work on it when I get home.
redjazz96 is offline
VJTCI
New Member
Join Date: Oct 2013
Location: DeLand, FL.
Old 10-07-2013 , 23:41   Re: [TF2] Dispenser Music (v0.2.0, 2013-06-09)
Reply With Quote #22

Please Please Please need a volume control sounds low but hearable when no one is in the server but when people are playing you cant hear it over the shots or the constant banging on it from other Engineers also needs a addon to have it play on 1 dispenser per team having 2-3 engineers setting up next to you it has multiple songs playing at once
VJTCI is offline
Astridax
Member
Join Date: Dec 2009
Old 10-30-2013 , 06:34   Re: [TF2] Dispenser Music (v0.2.0, 2013-06-09)
Reply With Quote #23

With regards to volume, when I had sounds played via sourcemod I almost always had to manually amplify them with GoldWave or something similar before I uploaded them.
Astridax is offline
redjazz96
Junior Member
Join Date: Jul 2013
Old 04-22-2014 , 19:23   Re: [TF2] Dispenser Music (v0.2.0, 2013-06-09)
Reply With Quote #24

Just an update on this: I updated the source code, there should be no limit to the number of songs now, and the music starts when the dispenser is fully built.

However, the ability to make sure the song loops is really out of control of the plugin - the ponyspenser plugin has the time lengths of the songs that it has, whereas this plugin doesn't really.

Changing the volume is possible, but I'm not sure how I'd go about doing that.
redjazz96 is offline
ClassicGuzzi
Veteran Member
Join Date: Oct 2013
Location: Argentina
Old 04-22-2014 , 23:48   Re: [TF2] Dispenser Music (v0.2.0, 2013-06-09)
Reply With Quote #25

Quote:
Originally Posted by redjazz96 View Post
Just an update on this: I updated the source code, there should be no limit to the number of songs now, and the music starts when the dispenser is fully built.

However, the ability to make sure the song loops is really out of control of the plugin - the ponyspenser plugin has the time lengths of the songs that it has, whereas this plugin doesn't really.

Changing the volume is possible, but I'm not sure how I'd go about doing that.
I think that, you should add that time option in the config file, so, if we put a time, it should loop, if not, it would work like is working right now.

You need to create a vector of handles to make the time thing work, something like this:


As a global:
Code:
new Handle:soundTimers[MAXPLAYERS+1];
This when you start the song
Code:
	EmitSoundToAll(soundArray[sound], index, SNDCHAN_USER_BASE, SNDLEVEL_NORMAL, SND_NOFLAGS, SNDVOL_NORMAL, SNDPITCH_NORMAL, -1, position);
	new Handle:pack;
	new clientId = GetEventInt(event, "userid");
	new client = GetClientOfUserId(clientId);
	soundTimers[client] = CreateDataTimer(soundTime[sound], LoopSound, pack);
	WritePackCell(pack, index);
	WritePackCell(pack, sound);
	WritePackCell(pack, client);
And then, the timer itself
Code:
public Action:LoopSound(Handle:timer, Handle:pack)
{
	ResetPack(pack);
	new index = ReadPackCell(pack);
	new sound = ReadPackCell(pack);
	new client = ReadPackCell(pack);
	new Float:position[3];
	GetEntPropVector(index, Prop_Send, "m_vecOrigin", position);
	EmitSoundToAll(soundArray[sound], index, SNDCHAN_USER_BASE, SNDLEVEL_NORMAL, SND_NOFLAGS, SNDVOL_NORMAL, SNDPITCH_NORMAL, -1, position);

	new Handle:data;
	soundTimers[client] = CreateDataTimer(soundTime[sound], LoopSound, data);
	WritePackCell(data, index);
	WritePackCell(data, sound);
	WritePackCell(pack, client);
}
And don't forget to destroy the timer and delete the handle when that player's dispenser is destroyed
Code:
	KillTimer(soundTimers[client]);
	soundTimers[client] = INVALID_HANDLE;
Also, timers have low accuracy. The smallest possible interval is 0.1 seconds. If you implement the length/loop part, you should add this tip in the first post.

Very nice plugin thanks for your work!
ClassicGuzzi is offline
redjazz96
Junior Member
Join Date: Jul 2013
Old 04-24-2014 , 18:44   Re: [TF2] Dispenser Music (v0.3.0, 2014-04-22)
Reply With Quote #26

The issue is, the sounds themselves can be made to loop by this. I'm not sure if it's worth it to implement all of that just to get it to loop properly if the wave file wasn't marked to loop.

Not to mention, the issue that might come with having a time in the config file along with the file being marked to loop.
redjazz96 is offline
ClassicGuzzi
Veteran Member
Join Date: Oct 2013
Location: Argentina
Old 04-24-2014 , 23:11   Re: [TF2] Dispenser Music (v0.3.0, 2014-04-22)
Reply With Quote #27

Quote:
Originally Posted by redjazz96 View Post
The issue is, the sounds themselves can be made to loop by this. I'm not sure if it's worth it to implement all of that just to get it to loop properly if the wave file wasn't marked to loop.

Not to mention, the issue that might come with having a time in the config file along with the file being marked to loop.
Oh i see, thanks! I will look into it.
ClassicGuzzi is offline
barteh
Junior Member
Join Date: Mar 2014
Old 04-27-2014 , 12:51   Re: [TF2] Dispenser Music (v0.3.0, 2014-04-22)
Reply With Quote #28

is there any reason why this addon wouldn't work with HL2DM?
barteh is offline
redjazz96
Junior Member
Join Date: Jul 2013
Old 04-27-2014 , 20:34   Re: [TF2] Dispenser Music (v0.3.0, 2014-04-22)
Reply With Quote #29

Quote:
Originally Posted by barteh View Post
is there any reason why this addon wouldn't work with HL2DM?
Are there dispensers in HL2DM?
redjazz96 is offline
captaindeterprimary
AlliedModders Donor
Join Date: Sep 2012
Old 04-28-2014 , 11:12   Re: [TF2] Dispenser Music (v0.3.0, 2014-04-22)
Reply With Quote #30

Quote:
Originally Posted by redjazz96 View Post
Quote:
Originally Posted by barteh View Post
is there any reason why this addon wouldn't work with HL2DM?
Are there dispensers in HL2DM?
And are they actually functioning dispensers? Not just the prop/model. If so then maybe, if not then no.
__________________
Last edited by ; Today at 08:20 AM. Reason: Get rid of s
captaindeterprimary is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:11.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode