Adjusting character transparency during dialog

Started by goopscoop, Wed 18/02/2015 19:11:31

Previous topic - Next topic

goopscoop

I'm attempting to make a character flicker during a dialog sequence. The idea is that the character is disappearing slowly, flickering in and out of existence.

Anyway, when I attempt to adjust the characters transparency during dialog, nothing happens. The game eBlocks for the desired amount of time due to the "Wait" commands in the script, but the transparency doesn't actually change. Any ideas of why this is happening, or any work arounds? Bear in mind that this is written in the dialog editor, if that makes a difference.

Here are two different scripts I tried.

#1
Code: ags

  int trans = cDude.Transparency;
  while (trans < 40) {
  trans ++;
  cDude.Transparency = trans;
  Wait(1);
  }
  while (trans > 0) {
  trans --;
  cDude.Transparency = trans;
  Wait(1);
  }


#2
Code: ags

  cDude.Transparency = 60;
  Wait(40);
  cDude.Transparency = 20;
  Wait(20);
  cDude.Transparency = 40;
  Wait(20);
  cDude.Transparency = 50;
  Wait(20);
  cDude.Transparency = 80;
  Wait(20);
  cDude.Transparency = 0;

Vincent

You can try with the Tween Module that probably will work..

Code: ags

player.TweenTransparency(2. , 0, eEaseInTween, eNoBlockTween); // example

SMF spam blocked by CleanTalk