[MAYBE NOT :P] Transition override

Started by Crimson Wizard, Tue 22/06/2010 05:56:02

Previous topic - Next topic

Crimson Wizard

Well, I had this idea for some time, but remembered to post this only now.

Idea is to give user (game creator) the more user-friendly way* to override default transitions. Possibly, good way to do this is supporting functions in Global Script like transition_execute(bool fadein, out bool finished) or something like that.

Well, thinking about it, "out" is not supported by AGS script, so it can have return value, or require to call some internal function, like "EndTransition".


* currently it is quite possible to set "instant transition" in Global Settings and call custom written transition function from every "after fade in" and "leave room" event handlers in any room. Yes, yes, that is possible, but I am talking about user-friendliness here ;) With this idea implemented user can have "general" custom transition in Global Script and "particular" transition scripts for certain rooms if wanted.

Gilbert

You don't need to call them in every instant of FadeIn and LeaveRoom. Instead, you may use on_event() for such purpose (you can even do different stuff depending on the room number). I'm not quite sure whether the current list of covered events are enough for this purpose and if not it's better to suggest adding more events to it.

Also, talking about internally supported transitions, you don't need to stick to one default transition all the time. You can always use SetScreenTransition() to override the global setting in-game.

Crimson Wizard

#2
Oh... looks like I missed something again :P


EDIT: Well, it looks like current list of events does not have needed for transitions -
eEventEnterRoomBeforeFadein
      called just before room Player Enters Room event is run.
      DATA = new room number
eEventLeaveRoom
      called just after room Player Leaves Room event is run.
      DATA = room number they are leaving


Calin Leafshade

you can also do SetNextScreenTransition() which temporarily changes the transition type for the following transition and then changes it back.

Crimson Wizard

I am looking not to switching between default transitions, but inventing a more user friendly way to allow custom ones.

Pumaman

The Plugin API has a method for replacing the screen transitions; at the time there were no available DrawingSurface-tpye functions that would have been performant enough to use from the script.

However, this is a good idea for a future version to allow the script to do its own transitions.

SMF spam blocked by CleanTalk