Implement Some Noises?

Should we get some cool noises like that for "certain" maps


  • Total voters
    1

Jello

Contributor
Is it possible to get like a couple noises into the game? like some birds, crickets, here's a video of what I'm thinking of... Not the Big animals they showed like the elephants, but like just weird ass noises for instance the first 20 secs of the video


Cuz I have this map right now, same one I sent fixi for help with, just changed terrain: -not ready for release yet-have too much free time on my hands actually(for this week at only though)-

NewMap.PNG
And what I wanted to do was implement a couple of noises like the video up there, I feel like those noises would suit this map, like you're doing a route and all the sudden you hear a random animal noise or a bird, and you stop to think where it came from, think a lot of people would be excited about it-not-. I dont know anything about coding but I know it might be difficult or not possible at all but I just wanted to know....Just a suggestion
 

SeymourGore

Flatulent Cherub
I'm pretty sure it was Gheist that had once said Legions needed some ambient animal noises.

However, my concern would be the confusion it would cause for players when they hear a bird squawk, but not actually see a bird. I say, if they're going to add ambient animal noises, Poponfu should also animate and model some animals to go with the noises.
 

Fixious

Test Lead
This is possible. Some of Defender's maps have ambient sounds. I'd get with him on that since I've never figured out how to get sounds to loop.
 

Defender

Member
This is possible. Some of Defender's maps have ambient sounds. I'd get with him on that since I've never figured out how to get sounds to loop.

The audio emitter code in this game seems to be broken for maps, last time i tested.
So I had to make a looping function that randomly plays different sounds in my map.
The code below is from my map for Legends the Game, just to show the audio emitter code from TGE...


Code:
new SimGroup(Audio) {
        canSaveDynamicFields = "1";

        new AudioEmitter(Wind) {
            canSaveDynamicFields = "1";
            position = "-120.235 -152.114 602.465";
            rotation = "1 0 0 0";
            scale = "1 1 1";
            useProfileDescription = "0";
            fileName = "~/data/sound/realmwars/environment/WindBlowing-SoundBible.com.wav";
            type = "0";
            volume  = "1.0";
            outsideAmbient = "1";
            ReferenceDistance = "1";
            maxDistance = "3000";
            isLooping = "1";
            loopCount = "-1";
            minLoopGap = "0";
            maxLoopGap = "0";
            enableVisualFeedback = "1";
            is3D = "0";
            coneInsideAngle = "360";
            coneOutsideAngle = "360";
            coneOutsideVolume = "1";
            coneVector = "0 0 1";
            minDistance = "100";
        };
 
Last edited:

Defender

Member
You could use a simple trigger maybe about double the size of the no deploy zone trigger that calls some function to create some random none looping bird or what ever sounds in the area where the player enters the trigger. You could add a time out in the function, to stop any spamming, like we have in the chat functions.. If you want my help with this, I'm always around and willing too...

If you want random clouds, fog, rain, snow, I have some experimental functions that seem to work ok for that too, but it requires some tweaking for each map to get the effect you want.
My current test map starts off with clear sky no clouds, then the fog and clouds move in about 5 or 10 minutes later and it some times snows for a bit, then the weather changes back to clear day, or the fog just lifts, getting it all random has been the hard part, but so fare the players who seen my effect like it a lot... The only graphics issue I have seen in my random weather, is with the fog transition, some times it mite look a bit strange, but it hardly ever happens.
 
Last edited:

Jello

Contributor
I'm curious to know since defender helped me with the noises-that's outa the way- but is it possible to make it so that the when you step into something like
this Pond2.PNG Pond.PNG you get a splash?
 

Defender

Member
To use just make a trigger and scale the same as your lake, so it creates a splash particle as the player enters the lake..
You should use a shallow pond shape and have usePolysoup = "0";
So players enter the pond shape a bit, I think the pond shape from grassy will work..
This below should give you a decent effect as they enter, the emitters are from tribes2.



Code:
/*
  Fallen Empire: Legions
  Copyright (C) GarageGames.com, Inc.
*/

//------------------------------------------------------------------------------
datablock ParticleData(PlayerSplashMist)
{
  dragCoefficient      = 2.0;
  gravityCoefficient  = -0.05;
  inheritedVelFactor  = 0.0;
  constantAcceleration = 0.0;
  lifetimeMS          = 400;
  lifetimeVarianceMS  = 100;
  useInvAlpha          = false;
  spinRandomMin        = -90.0;
  spinRandomMax        = 500.0;
  textureName          = "legions/data/shapes/particles/Snowdust.dds";
  colors[0]    = "0.7 0.8 1.0 1.0";
  colors[1]    = "0.7 0.8 1.0 0.5";
  colors[2]    = "0.7 0.8 1.0 0.0";
  sizes[0]      = 0.5;
  sizes[1]      = 0.5;
  sizes[2]      = 0.8;
  times[0]      = 0.0;
  times[1]      = 0.5;
  times[2]      = 1.0;
};

datablock ParticleEmitterData(PlayerSplashMistEmitter)
{
  ejectionPeriodMS = 5;
  periodVarianceMS = 0;
  ejectionVelocity = 3.0;
  velocityVariance = 2.0;
  ejectionOffset  = 0.0;
  thetaMin        = 85;
  thetaMax        = 85;
  phiReferenceVel  = 0;
  phiVariance      = 360;
  overrideAdvances = false;
  lifetimeMS      = 250;
  particles = "PlayerSplashMist";
  doDistanceFade = true;
    startFadeDistance = 10;
    endFadeDistance = 500;
};

//------------------------------------------------------------------------------

datablock ParticleData( PlayerSplashParticle )
{
  dragCoefficient      = 1;
  gravityCoefficient  = 0.2;
  inheritedVelFactor  = 0.2;
  constantAcceleration = -0.0;
  lifetimeMS          = 600;
  lifetimeVarianceMS  = 0;
  textureName          = "legions/data/shapes/grassy/WaterSpray.dds";
  colors[0]    = "0.7 0.8 1.0 1.0";
  colors[1]    = "0.7 0.8 1.0 0.5";
  colors[2]    = "0.7 0.8 1.0 0.0";
  sizes[0]      = 0.5;
  sizes[1]      = 0.5;
  sizes[2]      = 0.5;
  times[0]      = 0.0;
  times[1]      = 0.5;
  times[2]      = 1.0;
};

datablock ParticleEmitterData( PlayerSplashEmitter )
{
  ejectionPeriodMS = 1;
  periodVarianceMS = 0;
  ejectionVelocity = 3;
  velocityVariance = 1.0;
  ejectionOffset  = 0.0;
  thetaMin        = 60;
  thetaMax        = 80;
  phiReferenceVel  = 0;
  phiVariance      = 360;
  overrideAdvances = false;
  orientParticles  = true;
  lifetimeMS      = 100;
  particles = "PlayerSplashParticle";
  doDistanceFade = true;
    startFadeDistance = 10;
    endFadeDistance = 500;
};

//------------------------------------------------------------------------------
//  Hi_environmental_lake_Trigger_1
//------------------------------------------------------------------------------

datablock TriggerData(Hi_environmental_lake_Trigger_1)
{
  tickPeriodMs = 250;
};

//------------------------------------------------------------------------------

function Hi_environmental_lake_Trigger_1::onEnterTrigger( %this, %trigger, %obj )
{
  %velocity = VectorLen(%obj.client.player.getVelocity());
  if((%obj.getClassName() $= "Player") && (%velocity > 10))
  {
  echo("\n--------- ( Hi_environmental_lake_Trigger_1 ) ---------");
  //ServerPlay3D(Hi_environmental_lake_Spalsh_1, %obj.getTransform());
  %emitter1 = new ParticleEmitterNode(){
  scale = "2 2 2";
  datablock = defaultParticleEmitterNode;
  emitter = PlayerSplashMistEmitter;
  position = %obj.getWorldBoxCenter();
  };
  MissionCleanup.add(%emitter1);
  %emitter1.schedule(250, delete);
  //------------------------------------------------
  %emitter2 = new ParticleEmitterNode(){
  scale = "2 2 2";
  datablock = defaultParticleEmitterNode;
  emitter = PlayerSplashEmitter;
  position = %obj.getWorldBoxCenter();
  };
  MissionCleanup.add(%emitter2);
  %emitter2.schedule(250, delete);
  }
}

//------------------------------------------------------------------------------

function Hi_environmental_lake_Trigger_1::onTickTrigger( %this, %trigger )
{
  %numObjects = %trigger.getNumObjects();
  for (%i = 0; %i < %numObjects; %i++)
      %this.onEnterTrigger(%trigger, %trigger.getObject(%i));
}


//------------------------------------------------------------------------------
 
Last edited:

Defender

Member
I added a speed check of 5 for the player, let me know if the emitter keeps emitting when the player stands still.. If the player is walking and no emitter, try lowering the number to 2 or 3, if you want the water emitter for walking.

Code:
%speed = VectorLen(%obj.player.GetVelocity());
  if (%speed < 5)
 

Defender

Member
This works now, the player needs to be walking or moving faster, or no emitter is emitted..
try reducing the trigger tick time from 1000 to 250, that will create an emitter more often...

Code:
function Hi_environmental_lake_Trigger_1::onEnterTrigger( %this, %trigger, %obj )
{
  %velocity = VectorLen(%obj.client.player.getVelocity());
  if((%obj.getClassName() $= "Player") && (%velocity > 10))
  {
  echo("\n--------- ( Hi_environmental_lake_Trigger_1 ) ---------");
  //ServerPlay3D(Hi_environmental_lake_Spalsh_1, %obj.getTransform());
  %emitter1 = new ParticleEmitterNode(){
  scale = "2 2 2";
  datablock = defaultParticleEmitterNode;
  emitter = PlayerSplashMistEmitter;
  position = %obj.getWorldBoxCenter();
  };
  MissionCleanup.add(%emitter1);
  %emitter1.schedule(250, delete);
  //------------------------------------------------
  %emitter2 = new ParticleEmitterNode(){
  scale = "2 2 2";
  datablock = defaultParticleEmitterNode;
  emitter = PlayerSplashEmitter;
  position = %obj.getWorldBoxCenter();
  };
  MissionCleanup.add(%emitter2);
  %emitter2.schedule(250, delete);
  }
}
 
Last edited:
Top