Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Volcan on Sat 19/07/2003 03:44:02

Title: Making ego disaspear
Post by: Volcan on Sat 19/07/2003 03:44:02
I wish to make EGO disaspear slowly

SetCharacterTransparency(EGO,25);
Wait(80);
SetCharacterTransparency(EGO,50);
Wait(80);
SetCharacterTransparency(EGO,75);
Wait(80);
SetCharacterTransparency(EGO,100);

Unstead the game takes some time and the EGO
disaspear without seeing fade out.


Volcan
Title: Re:Making ego disaspear
Post by: TerranRich on Sat 19/07/2003 03:56:21
Do what I do:

int i=0;
while (i<=100) {
(http://www.harbinger-software.com/images/space.gif)SetCharacterTransparency(EGO,i);
(http://www.harbinger-software.com/images/space.gif)i++;
(http://www.harbinger-software.com/images/space.gif)Wait(1); // 1 for 2.5 sec fade, 2 for 5 sec, 3 for 7.5 sec, 4 for 10 sec, etc.
}

This way, EGO will gradually fade away, step by step, and quickly too. Within 2.5 seconds at best I believe. :)
Title: Re:Making ego disaspear
Post by: Ben on Sat 19/07/2003 04:03:29
Also, your game needs to be in high-color for transparency to work..
Title: Re:Making ego disaspear
Post by: Volcan on Sat 19/07/2003 04:03:30
I'll check it tomorrow.

Time to bed for me.


Volcan
Title: Re:Making ego disaspear
Post by: Volcan on Sat 19/07/2003 14:25:46
Ho no! I just read the manual carfully today. SetCharacterTransparency works in hi-color only.

My game is in 256 color. All right, I'll make disaspear
the EGO somehow. Thanks everybody


Volcan
Title: Re:Making ego disaspear
Post by: Barcik on Sat 19/07/2003 14:47:54
You can always make an animation...
Title: Re:Making ego disaspear
Post by: Volcan on Sat 19/07/2003 14:52:35
Sure.