Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: rtf on Fri 02/04/2004 01:02:53

Title: Value as Parameter
Post by: rtf on Fri 02/04/2004 01:02:53
Hey.
Let's get right to it.

In my room script, I want there to be this part where Character EVIL's Transparency decreases gradually from 100 .
My idea was this:





 int tran = 100;




    while (tran > 0){
     SetCharacterTransparancy(EVIL,



That was where I stopped, becasue I diddn't know if AGS could set a value to be an integer on a parameter.


I know it can be done, so can someone please tell
Title: Re:Value as Parameter
Post by: Gilbert on Fri 02/04/2004 02:53:07
Why?

I don't quite understand what did you mean by:
Quote
I diddn't know if AGS could set a value to be an integer on a parameter.

The only accetable variable types currently are only integers (plus vatiants, like short and char) and strings.

Judging from your code, I think what you're going to do is:
while (tran > 0){
SetCharacterTransparancy(EVIL,tran);
Wait(1);
tran--;
}
Title: Re:Value as Parameter
Post by: rtf on Fri 02/04/2004 07:44:19
Even if you don't understand, I do thanks to your description.  Thanks

I had a hunch that that might work.