Game Development Reference
Script Editor Example
In this section of the topic, you
ll take a look at how you use the Script Editor
ll also create a simple example that you can follow to help you feel more
comfortable with how the system works. You
ll use the dialog box you created to
warp the player to another zone when typing in the term / twarp into the chat
You have created a dialog box, and you need to create the code that responds
when the player clicks on the Move to Zone button. Ensure you have the dialog
box on-screen and then double-click on the Move to Zone button. This will take
you into the code for this dialog box, and also place you where the code is
activated when the player presses the button, as shown in Figure 15.16.
The code in Newtest.cs.
I have added some code that will activate the code to warp the player after a set
amount of time has passed, as shown in Figure 15.17.
Once the code has been entered for this dialog box, you then need to initiate the
dialog box when the player enters / twarp into the chat window. As all chat