| Simpanra   Senior Member
 
 Posts: 314
 Threads: 28
 Joined: Mar 2011
 Reputation: 
0
 | 
			|  Particle System HELP NEEDED =3 
 
				Hello everyone =) A really quick question form me, I would really like to know the script function for activating a particle system. By this i mean; I have an AddEntityCollideCallback which calls for; Give sanity damage, play sound at entity (the entity is a door) and finally i want the script for making dust appear infront of the door (to give the appearance of something hitting the door from the far side). I have seen this done before and i tried to make the particle system appear by setting it as inactive in the editor and then using a SetEntityActive function to spawn it. I have tested the map and the sanity damage is dealt and the sound effect does play (though really quietly....speaking of which, does anyone know how to increase the volume of a sound effect?) but the particle system just doesn't appear =( 
 All help is much appreciated and if you could help me with increasing the volume of a sound effect then that would be great too ^_^
 
 Thanks!!!!
 
 Edd,
 
				
(This post was last modified: 05-04-2011, 05:30 PM by Simpanra.)
 |  | 
	| 05-04-2011, 05:30 PM |  | 
	
		| Roenlond   Senior Member
 
 Posts: 331
 Threads: 3
 Joined: Apr 2011
 Reputation: 
0
 | 
			| RE: Particle System HELP NEEDED =3 
 
				void FunctionName(string &in asParent, string &in asChild, int alstate){
 CreateParticleSystemAtEntity("InternalName", "ps_particlefile.ps", "Where to spawn, either at a real entity or just create a script area for it", true);
 }
 
 Only way I know to set the volume of a file is via playmusic. You could try to use:
 
 FadeGlobalSoundVolume(float afDestVolume, float afTime);
 
 for the duration of the sound effect, and then fade back to normal - that would increase the volume of all sounds and music, though.
 
				
(This post was last modified: 05-04-2011, 05:46 PM by Roenlond.)
 |  | 
	| 05-04-2011, 05:44 PM |  | 
	
		| Simpanra   Senior Member
 
 Posts: 314
 Threads: 28
 Joined: Mar 2011
 Reputation: 
0
 | 
			| RE: Particle System HELP NEEDED =3 
 
				 (05-04-2011, 05:44 PM)Roenlond Wrote:  void FunctionName(string &in asParent, string &in asChild, int alstate){
 CreateParticleSystemAtEntity("InternalName", "ps_particlefile.ps", "Where to spawn, either at a real entity or just create a script area for it", true);
 }
 
 Only way I know to set the volume of a file is via playmusic. You could try to use:
 
 FadeGlobalSoundVolume(float afDestVolume, float afTime);
 
 for the duration of the sound effect, and then fade back to normal - that would increase the volume of all sounds and music, though.
 
Thank you! =D I am going to test this now =)
			 |  | 
	| 05-04-2011, 05:48 PM |  |