Game Development Reference
Now you need to change the warping code and replace it with your own. You are
looking for the line that activates a bit of code when the player uses warp; this
can be seen in Figure 15.19. Select this line and delete the code.
The code that requires deleting.
Replace the code shown in Figure 15.19 with the code shown in Figure 15.20.
The new code you are using to warp.
You can find the original example of this code on YouTube written by Jared Belkus at http://www.
youtube.com/user/jbelkus123#p/u/3/OICpDwZwKGE. Check it out to see how it all flows and to get
more guidance if you
re having problems getting it to work.
Once you have entered all of this code, you can test that you haven
t made any
mistakes by running the test server. If all of your servers come online, your code
is working correctly, as shown in Figure 15.21.
Run your game. When you enter the world, you will need to enter the chat
window, so type /twarp and you will immediately see the dialog box appear on-
screen. Click on the button and it will begin to transport you to your new zone.
Congratulations, you have successfully created your first C# script and imple-
mented it within your MMO.