Frictional Games Forum (read-only)
Script Help (again) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Script Help (again) (/thread-14762.html)



Script Help (again) - Nomad923 - 04-13-2012

I have alittle function here but the sound im telling it to play isnt playing and the particle effects are not working either i think the string is wrong but im not sure what is needed.


void ActivateQuake(string &in item)
{

SetEntityActive("stone_small01_1", true);
SetEntityActive("stone_small01_2", true);
SetEntityActive("stone_small01_3", true);
SetEntityActive("stone_med01_brown_1", false);
PlayMusic("baseap.ogg", false, 0.7, 0.1, 10, false);
PlaySoundAtEntity("","general_rock_rumble", "Player", 0, true);
CreateParticleSystemAtEntity("", "ps_debris_tunnel", "dust_effect_1", false);
CreateParticleSystemAtEntity("", "ps_debris_tunnel", "dust_effect_2", false);
CreateParticleSystemAtEntity("", "ps_debris_tunnel", "dust_effect_3", false);
AddTimer("T1", 6, "Fallin");

}

Edit: ive managed to get the particles working but still no sound


RE: Script Help (again) - nemesis567 - 04-13-2012

For the sound remember this : "asSoundFile - the sound to use + extension .snt"

So you're missing .snt extention. Also verify if that's the correct filename and that it has a SNT file(required for 3D audio details).

For the particles remember this : "asPSFile - the particle system to use + extension .ps"

Also verify the filename.

So of the filenames you used are correct(IT IS a file name, not the name of something in the script) it should look like:

PHP Code:
void ActivateQuake(string &in item)
{

    
SetEntityActive("stone_small01_1"true);
    
SetEntityActive("stone_small01_2"true);
    
SetEntityActive("stone_small01_3"true);
    
SetEntityActive("stone_med01_brown_1"false);
    
PlayMusic("baseap.ogg"false0.70.110false);
    
PlaySoundAtEntity("","general_rock_rumble.snt""Player"0true);
    
CreateParticleSystemAtEntity("""ps_debris_tunnel.ps""dust_effect_1"false);
    
CreateParticleSystemAtEntity("""ps_debris_tunnel.ps""dust_effect_2"false);
    
CreateParticleSystemAtEntity("""ps_debris_tunnel.ps""dust_effect_3"false);
    
AddTimer("T1"6"Fallin");





RE: Script Help (again) - Nomad923 - 04-13-2012

(04-13-2012, 10:30 PM)nemesis567 Wrote: For the sound remember this : "asSoundFile - the sound to use + extension .snt"

So you're missing .snt extention. Also verify if that's the correct filename and that it has a SNT file(required for 3D audio details).

For the particles remember this : "asPSFile - the particle system to use + extension .ps"

Also verify the filename.

So of the filenames you used are correct(IT IS a file name, not the name of something in the script) it should look like:

PHP Code:
void ActivateQuake(string &in item)
{

    
SetEntityActive("stone_small01_1"true);
    
SetEntityActive("stone_small01_2"true);
    
SetEntityActive("stone_small01_3"true);
    
SetEntityActive("stone_med01_brown_1"false);
    
PlayMusic("baseap.ogg"false0.70.110false);
    
PlaySoundAtEntity("","general_rock_rumble.snt""Player"0true);
    
CreateParticleSystemAtEntity("""ps_debris_tunnel.ps""dust_effect_1"false);
    
CreateParticleSystemAtEntity("""ps_debris_tunnel.ps""dust_effect_2"false);
    
CreateParticleSystemAtEntity("""ps_debris_tunnel.ps""dust_effect_3"false);
    
AddTimer("T1"6"Fallin");


Ok after doing what you said its still not working

Edit: Ok i changed the sound to general_rock_rumble_no3d.snt instead and its working now.


RE: Script Help (again) - Putmalk - 04-13-2012

You don't need the .snt in all cases, I don't always use it and the base game scripts don't always use it. Let me check the script out, maybe I'll see an error or something.

Nevermind, it seems you got it to work...just ignore this.


RE: Script Help (again) - nemesis567 - 04-13-2012

The point was what I said: "Also verify if that's the correct filename and that it has a SNT file". The other was only a measure to take if you were sure of the file name.



RE: Script Help (again) - Putmalk - 04-13-2012

(04-13-2012, 11:00 PM)nemesis567 Wrote: The point was what I said: "Also verify if that's the correct filename and that it has a SNT file". The other was only a measure to take if you were sure of the file name.
Yeah, that's why I said ignore what I said. The forum wasn't letting me delete it.