EDIT: erm, did not notice this thread is marked as "solved" already. Well, I'll leave my post here just in case someone will find it useful.
---------------------------------------------------------
BTW I made a custom transition once, it looks like colored stripes fill the screen one by one, then dissapear in same order. I can post my code as an example when I get home later today.
A while passed since I coded that so I may be mistaken in details, but in general you should:
1) Set "Instant" as your default room transition type.
2) Make a separate module (script header/source pair) for scripting convenience.
3) Define and write at least two functions there, one for "fade in", another for "fade out". I also think it should be assumed that these functions are run multiple times - every game loop until transition is finished, because otherwise AGS won't be able to update image on screen (well, someone will correct me if I am wrong). This also means you should save transition state and all related data between function calls (preferably in the same module).
4) There should be some kind of variable that determines current transition state (Not going / making fade-out / fade-out ended / making fade-in / fade-in ended, or something like that). As I said earlier, this variable should preferably be placed in that separate module, but should be also exported for use in other modules.
Also there possibly should be variables to save target room and coordinates where character should appear after transition. One of the solutions would be to call player.ChangeRoom() from the function that implements "fade-out".
5) In each room you need this transition to fade-out or fade-in set that variable so your transition module will know what to do.
Set transition state to "making fade-out" at the place in script where character should leave the room, and set target room and coordinates to whatever you need.
In "After fade in" room event set transtion state to "making fade-in".
6) In Global script's repeatedly_execute function place a check whether transtion state is "making fade-in" or "making fade out" and if it is, then call corresponding transition function from your module you wrote earlier.
Well, I know this explanation may be a bit clumsy, but as I said I am going to post my example here later. Or maybe someone else will do.
---------------------------------------------------------
Quote from: Studio E3 on Thu 09/06/2011 05:22:06You can code transition in a separate module (in AGS script) and copy that module to all the games you are making later.
I wan't to make a transition I could save it somehow and load it into another AGS game.
BTW I made a custom transition once, it looks like colored stripes fill the screen one by one, then dissapear in same order. I can post my code as an example when I get home later today.
A while passed since I coded that so I may be mistaken in details, but in general you should:
1) Set "Instant" as your default room transition type.
2) Make a separate module (script header/source pair) for scripting convenience.
3) Define and write at least two functions there, one for "fade in", another for "fade out". I also think it should be assumed that these functions are run multiple times - every game loop until transition is finished, because otherwise AGS won't be able to update image on screen (well, someone will correct me if I am wrong). This also means you should save transition state and all related data between function calls (preferably in the same module).
4) There should be some kind of variable that determines current transition state (Not going / making fade-out / fade-out ended / making fade-in / fade-in ended, or something like that). As I said earlier, this variable should preferably be placed in that separate module, but should be also exported for use in other modules.
Also there possibly should be variables to save target room and coordinates where character should appear after transition. One of the solutions would be to call player.ChangeRoom() from the function that implements "fade-out".
5) In each room you need this transition to fade-out or fade-in set that variable so your transition module will know what to do.
Set transition state to "making fade-out" at the place in script where character should leave the room, and set target room and coordinates to whatever you need.
In "After fade in" room event set transtion state to "making fade-in".
6) In Global script's repeatedly_execute function place a check whether transtion state is "making fade-in" or "making fade out" and if it is, then call corresponding transition function from your module you wrote earlier.
Well, I know this explanation may be a bit clumsy, but as I said I am going to post my example here later. Or maybe someone else will do.
Quote from: Calin Leafshade on Thu 09/06/2011 03:37:52I've drawn mine using dynamic sprites iirc btw
just draw the transition to a full screen gui.
