Author Topic: Unwanted sound on remove effect polymorph (in cutscene)  (Read 395 times)

Legacy_Lovelamb

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +0/-0
Unwanted sound on remove effect polymorph (in cutscene)
« on: February 15, 2012, 03:32:53 pm »


               At the end of my cutscenes, a roaring sound can be heard. It looks like it comes from removing polymorph (into "null human") whether I set the effect's duration to exactly what I need or longer/permanent and then remove it through another function. If I don't use the polymorph effect, there is no sound.

The PC must not be seen in these cutscenes. Is there a way to avoid the noise?

Please review the order and timing of other things in this script, too. On one playtesting, the camera facing was wrong, even though I thought it worked fine before. After changing the delays, it seems to be working again, but I'm not so certain it's all good.

 
void RemovePoli() {
  object oPC = GetFirstPC();
  effect eEff = GetFirstEffect(oPC);
  while (GetIsEffectValid(eEff)) {
    if (GetEffectType(eEff) == EFFECT_TYPE_POLYMORPH)
      RemoveEffect(oPC, eEff);
    eEff = GetNextEffect(oPC);
  }
}

void main() {
  object oPC = GetFirstPC();
  object oPCsEndDestination = GetObjectByTag("end_dest");
  object oPCPosition = GetObjectByTag("cutscene_pov");
  effect eDomi = EffectCutsceneDominated();
  float nDur = 50.0f;

  // actors
  object oNPC1 = GetObjectByTag("NPC1_tag");
  object oNPC2 = GetObjectByTag("NPC2_tag");

  // store camera 
  StoreCameraFacing();

  // set time to daytime
  SetTime(14, 0, 0, 0);

  // polymorph PC (I also tried with duration being nDur and no RemovePoli(), and with DURATION_TYPE_PERMANENT)

  ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectPolymorph(POLYMORPH_TYPE_NULL_HUMAN), oPC, 3600.0);
  ApplyEffectToObject(DURATION_TYPE_TEMPORARY, EffectCutsceneGhost(), oPC, nDur);

  BlackScreen(oPC);

  // camera facing
  DelayCommand(1.0f, AssignCommand(oPC, SetCameraFacing(-1.0, 5.0f, 85.0, CAMERA_TRANSITION_TYPE_SNAP)));

  // bring PC, dominate
  AssignCommand(oPC, ActionJumpToObject(oPCPosition));

  DelayCommand(1.2f, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eDomi, oPC, nDur-2.0));
  DelayCommand(1.2f, SetCutsceneMode(oPC, TRUE, FALSE));

  // the scene begins
  DelayCommand(5.0f, FadeFromBlack(oPC));
  DelayCommand(7.5f, AssignCommand(oNPC1, ActionSpeakString("''Do you have everything, sir?''")));
  DelayCommand(13.0f, AssignCommand(oNPC2, ActionSpeakString("''Sure, sure...''")));

  // NPCs talk, walk and play animations, some get destroyed with DestroyObject()
  // ...

  // restore camera
  DelayCommand(nDur+1.0f, RestoreCameraFacing());

  // end the cutscene
  DelayCommand(nDur, FadeToBlack(oPC));
  DelayCommand(nDur+2.0f, SetCutsceneMode(oPC, FALSE));
  DelayCommand(nDur+2.2f, RemovePoli());
  DelayCommand(nDur+3.0f, AssignCommand(oPC, ActionJumpToObject(oPCsEndDestination)));
}
 
               
               

               


                     Modifié par Lovelamb, 15 février 2012 - 03:47 .
                     
                  


            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
Unwanted sound on remove effect polymorph (in cutscene)
« Reply #1 on: February 15, 2012, 04:30:59 pm »


               If the poly is giving you trouble then dont use it.  Just set the PC's appearance type instead. I think 298 would work.  then set the appearance back to what it was to begin with.
               
               

               
            

Legacy_Lovelamb

  • Jr. Member
  • **
  • Posts: 68
  • Karma: +0/-0
Unwanted sound on remove effect polymorph (in cutscene)
« Reply #2 on: February 15, 2012, 09:44:07 pm »


               It works fine with the appearance change. Thank you.
               
               

               
            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
Unwanted sound on remove effect polymorph (in cutscene)
« Reply #3 on: February 16, 2012, 02:50:45 pm »


               I tend to use the cutscene invisibility effect combined with cutscene ghost when I need an unseen PC in a cutscene.  Then I use them walking about when I want the camera to pan around a scene.
               
               

               
            

Legacy_WhiZard

  • Hero Member
  • *****
  • Posts: 2149
  • Karma: +0/-0
Unwanted sound on remove effect polymorph (in cutscene)
« Reply #4 on: February 17, 2012, 05:28:13 am »


               

Failed.Bard wrote...

I tend to use the cutscene invisibility effect combined with cutscene ghost when I need an unseen PC in a cutscene.  Then I use them walking about when I want the camera to pan around a scene.


But watch out for auras there, I just love seeing this green dotted circle move around without anyone inside it, and oh the problems it could wreak if any of its on-enter scripts fire.