Make object fade in quicker

Started by barefoot, Sat 26/02/2011 07:43:19

Previous topic - Next topic

barefoot

Hi

I have the following script. What changes would I need for the object to fade in  a bit quicker?

Also I believe there may be a plugin for this type of thing.. Fading an object out is no problem.


Code: ags

function region1_WalksOnto()
{
  cwizard.ChangeView(28);
  Wait(2);
  cwizard.ChangeView(29);
  Display("You gaze into the oasis and notice its tranqulity. Thoughts become clearer the mind becomes pure. An image begins to appear");

  int trans = object[0].Transparency;
  while (trans < 100) {
  trans++;
  object[0].Transparency=100-trans;
  Wait(1);

}

  object[0].Visible = true;
  obluesage.SetView(30);
  obluesage.Animate(0, 5,  eRepeat, eNoBlock);
  cEgo.SayAt(395, 20, 250, "Magrid. I am Kazziba an anxient sage. I am appearing to you in a vision. We pray everyday for you. Be strong.");
  obluesage.SetView(30, 0, 0);
}


Cheers

barefoot


I May Not Be Perfect but I Have A Big Heart ..

barefoot

#1
Hi

I looked again at the code and moved the object[0].Visible = true; and it works as it should now..

Code: ags

unction region1_WalksOnto()
{
  cwizard.ChangeView(28);
  Wait(2);
  cwizard.ChangeView(29);
  Display("You gaze into the oasis and notice its tranqulity. Thoughts become clearer the mind becomes pure. An image begins to appear");
 object[0].Visible = true;
  int trans = object[0].Transparency;
  while (trans < 100) {
  trans++;
  object[0].Transparency=100-trans;
  Wait(1);

}

 
  obluesage.SetView(30);
  obluesage.Animate(0, 5,  eRepeat, eNoBlock);
  cEgo.SayAt(395, 20, 250, "Magrid. I am Kazziba an anxient sage. I am appearing to you in a vision. We pray everyday for you. Be strong.");
  obluesage.SetView(30, 0, 0);
}


barefoot


I May Not Be Perfect but I Have A Big Heart ..

suicidal pencil

Instead of incrementing 'trans' by one, try a higher number.

try 'trans += 5;'

barefoot

Hi

I shall make a note of that..

cheers suicidal pencil

barefoot
I May Not Be Perfect but I Have A Big Heart ..

mode7

Alternatively you could also use the AGStween module which can tween all sorts of settings including transparency in an very easy to use manner.

barefoot

Cheers mode7.. i'll look into that

barefoot
I May Not Be Perfect but I Have A Big Heart ..

SMF spam blocked by CleanTalk