LightPhoenix
First Post
Okay, I haven't has as much time this weekend as I thought, but I figured I'd post something now. While playing on Lazybones' server (which was a blast! Even if my computer crashed
) I noticed that in order to read the sign, you had to "Examine" it. While it's a viable option, it's not one I chose to go with designing my soon to be playable module. I like the conversation GUI better, so I learned a simple trick that I thought I'd pass on to you.
This trick is two-fold, and it gets a little bit into scripting.
First, on placeable properties. Every placeable (tables, signs, etc) in the game has a set of scripts that are attached to it. Most of these are either left blank or assigned to a default script by the editor when you put the chest down. On of the most useful, IMO, is "OnUsed".
If you haven't guessed already, if there is a script in the OnUsed line, it will be run when the object is used. Since we want the sign to start a conversation when it is used, this is where we're going to put our script.
First, write the conversation. The Conversation Editor is decently documented, so I'm not going to go over the how-to of that. Name the converstaion con_bboard (or whatever you want).
Open up the Script Editor and input the following code. Note that this is case-sensative:
The first line declares an object and names it oUser. GetLastUsedBy gets whatever last triggered the OnUsed event. In this example, it would be whatever player last clicked on the sign to read it.
The next function, BeginConversation, simply starts the conversation engine. The first parameter is the name of the conversation you wrote earlier and that you want to be displayed when you click on the sign. The second parameter is the player that we want to display it to. In this case, we get whatever triggered the script and show the conversation to him/her.
Feel free to ask any questions. I'll post another installment (making a Potion of Heroism) tonight.

This trick is two-fold, and it gets a little bit into scripting.
First, on placeable properties. Every placeable (tables, signs, etc) in the game has a set of scripts that are attached to it. Most of these are either left blank or assigned to a default script by the editor when you put the chest down. On of the most useful, IMO, is "OnUsed".
If you haven't guessed already, if there is a script in the OnUsed line, it will be run when the object is used. Since we want the sign to start a conversation when it is used, this is where we're going to put our script.
First, write the conversation. The Conversation Editor is decently documented, so I'm not going to go over the how-to of that. Name the converstaion con_bboard (or whatever you want).
Open up the Script Editor and input the following code. Note that this is case-sensative:
Code:
void main()
{
object oUser = GetLastUsedBy();
BeginConverstaion("con_bboard", oUser);
}
The first line declares an object and names it oUser. GetLastUsedBy gets whatever last triggered the OnUsed event. In this example, it would be whatever player last clicked on the sign to read it.
The next function, BeginConversation, simply starts the conversation engine. The first parameter is the name of the conversation you wrote earlier and that you want to be displayed when you click on the sign. The second parameter is the player that we want to display it to. In this case, we get whatever triggered the script and show the conversation to him/her.
Feel free to ask any questions. I'll post another installment (making a Potion of Heroism) tonight.