Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
jdagenet

How to make things fade out in ACS?

Recommended Posts

How would I make things such as monsters, weapons, ammo, etc fade out slowly? I know how to fade them in using this script:

script 999 (int thingID, int thingSpawn, int newTID)
{
   if(thingSpawn > 0)
   {
      Thing_SpawnFacing(thingID,thingSpawn,1,thingID);
   }

   int a = 0.1;
   int b = 0;
   ThingSound(thingID,"monster_spawn",127);
   Thing_Activate(thingID);
   SetActorProperty(thingID,APROP_RenderStyle,STYLE_Translucent);
   for(b = 1; b < 10; b++)
   {
      SetActorProperty(thingID,APROP_Alpha, a);
      a += 0.1;
      delay(2);
   } SetActorProperty(thingID,APROP_Alpha, 1.0);

   if(newTID > 0)
   {
   Thing_ChangeTID(thingID,newTID);
   }
}
But how would I reverse it and make the monster fade out and be removed from the map? Thank you for any help.

Share this post


Link to post

I'm not sure, but you can try this:

{
      SetActorProperty(thingID,APROP_Alpha, a);
      a -= 0.1;
      delay(2);
}
      Thing_Remove(thingID);

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×