Aller au contenu

Photo

Unwanted sound on remove effect polymorph (in cutscene)


  • Veuillez vous connecter pour répondre
4 réponses à ce sujet

#1
Lovelamb

Lovelamb
  • Members
  • 38 messages
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 .


#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
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.

#3
Lovelamb

Lovelamb
  • Members
  • 38 messages
It works fine with the appearance change. Thank you.

#4
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
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.

#5
WhiZard

WhiZard
  • Members
  • 1 204 messages

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.