I created code that will allow talk boxes not to freeze the game. I had already done that with having talk boxes with audio and I'm not sure I gave this code to Ched80 to put into the public mod.
Ched, let me know.
However, I created code that will not freeze the game. I could not have done this without v1.19.
There are two possibilities for the talk boxes to display. One is using player freeze and creating a time that the talk box will be displayed. This will take a lot of tweaking to determine the right amount of time so the player can be sure and finish reading the text box. However, I just finished coding an easier way of doing this using a mouse click when the player is ready to continue.
The script for these two ways is as follows:
Timer and player freeze script.
:state=0,plrdistwithin=50:rpg_talkboxnogamefreeze=1 4000,rpg_entitytimerstart,state=1
:state=1,rpg_entitytimergreater=4000:rpg_talkboxnogamefreeze=2 15000,rpg_entitytimerstart,state=2
:state=2,rpg_entitytimergreater=15000:rpg_talkbox=4,state=3
Edit:
Mouse click script. Any mouse button will do.
:state=0,plrdistwithin=100:rpg_talkboxnogamefreeze=1 0,state=1
:state=1,rpg_playerclickedmouse:rpg_talkboxnogamefreeze=2 0,rpg_entitytimerstart,state=3
:state=3,rpg_playerclickedmouse:rpg_talkbox=4,state=5
:state=5:destroy,state=6
Note that the first parameter is the number of the talk box created in the setup text file. The second parameter (separated by a space) is either the freeze time or 0 if wanting to use the mouse click. You do not have to have the name of the entity correspond to the name given in the setup file.
If you are using the timer you will need to make sure and use it before you go to the next state. You don't want the next state to be executed before the player is finished reading the text. You will notice that the value used is the same value in the talkbox parameter.
If you are using the mouse click then you will use the mouseclick=1 condition. We use the value 1 because I hard-coded this to be the left mouse button in the engine.
@Ched
As soon as you let me know if I had already sent you the talkbox with audio or not. If not, I'll send both the code to you.
Addendum (EDIT - 04/06/2012):
mouseclick=x does not work, in fact it is not even present in the code, and therefore the mouseclick=1 is not working. I am in the process if rewriting the code for
rpg_mouseclick=x so that it will work better. I'll make another post when this is possible. Of course, Ched80 doesn't have "talk boxes no game freeze" implemented as yet.
Edit:
I did rework rpg_mouseclick, however, I had to add a new command to work with rpg_talkboxnogamefreeze. This command is rpg_playerclickedmouse. The updated code is found in the code box above.