Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Phonoitypal

#21
Hey ! I managed to make my own FADE IN
using a guy with this code
Code: ags
function room_Load() {
gBlack1.Visible = true;
FadeOut(64);
oSky1.SetView(VSKY);
oSky1.Animate(0, 20, eRepeat,  eNoBlock);
}

function room_AfterFadeIn() {
  FadeOut(64);
  gBlack1.Visible = false;
  Wait(1);
  FadeIn(1);
}







- the vsky should be ignored since it does not have anything to do with my problem.
The thing is, how can I make it so that the 'fade out' effect is not as fluid ? I want to make it in a way so that it shows 2 levels of transparency (half, and completely transparent) successible, like on those old 8-bit games, the 'transition' has very low fps. Anyone can help me with that ?
#22
Also I hope my broken english at least allowed me to explain what I'm trying to achieve =(
#23
Hello !
This is my second day of using AGS.
I'm working on some game, so far - so good, I'm reading the documentation and I got a 'hang of it' - managed to do my first animation in the engine etc.
But I encountered a problem, which I think, in it's essence, might be simple, but I honestly lack the understanding as how to do it.

The idea : I want to make my own 'fade in' as in an object that is completely black, that decreases its transparancey over time so that it reaches 100(invisible); The question that I'm about to ask has to do with my stupid way of implementing it so that it does not work. Anyways, this question will also help me in the future regarding object transition of transparency and so on. I think I got lost a bit in the detail.

THE PROBLEM :
Whenever I'm trying to use the provided documentation regarding transparency
Code: ags
int trans = object[0].Transparency;
while (trans < 100) {
    trans++;
    object[0].Transparency = trans;
    Wait(1);
}

I get the error that after the "= of trans" the 'engine' expects an integer value.

What I did, so far, to test, was this

Code: ags
function room_Load() {
oBlack1.Transparency = 0; //Visible
}
if I try to put it in the room_Load stuff, it would not work, so I followed this example provided here:
Code: ags
function room_Load() {
  object[?].Transparency = 100; // Make full screen Object invisible.
}
followed by

Code: ags

// BEGIN FADING IN FULL SCREEN OBJECT SCRIPT.
        //-------------------------------------------
        int trans = object[?].Transparency; // Fade in the full screen Object until it is visible. 
        while (trans > 0) {
        trans--;
        object[?].Transparency = trans;
        Wait(1);
        }
        // END OF FADE IN SCRIPT.
        //-----------------------




Following this example step by step, replacing the object[?] - with my case, oBlack1 etc, does not work and always gives an unexpected 'while' or the engine crashes.
What am I doing wrong ? Could someone shed light as what I am missing ?

Thanks in advance and I really hope im not wasting your time !
SMF spam blocked by CleanTalk