Legendary Tales Official Website
News Search:
Home · Articles · Downloads · Discussion Forum · Old Forums (read only) · RegisterAugust 28 2008 04:46:18
Navigation
Home
Articles
Downloads
FAQ
Discussion Forum
Web Links
News
Contact Me
Screenshots
Search
Login
Username

Password

Save



Not a member yet?
Then register.

I forgot my password.

Why register?
Newsletter
Subscribe now to receive important news, game releases and site updates
Buy 3 Skulls only $9.99

Download a demo

Full version download immediately after purchase!

You can also use your credit card without a paypal account.

Visa Mastercard American Express Discover
Making NPC's Talk In .vbs
Ok, making NPC's talk is a very important part of your game. It'll add realism and also allow you to tell the player to go somewhere or do something without spoiling the rpg feel. This is how to make your npc's talk:

Ok, making NPC's talk is a very important part of your game. It'll add realism and also allow you to tell the player to go somewhere or do something without spoiling the rpg feel. This is how to make your npc's talk:


Function OnDialog()
Echo("NPC: What NPC is saying")
End Function


Ok, let's break this down...

Function - A function is simply something that is called
by the engine when certain things happen.
E.G: OnEnter() When someone enters etc.

Function OnDialog() - This is called whenever the player clicks on the "Talk to" button and selects and NPC. The engine then looks for this is the NPC's script.

Echo("NPC: What NPC is saying") - The
"Echo" command makes text appear on the screen, simple as. Most games using the LT engine write dialogues in script from. With the thing that is talking seperated by a colon (:).

End Function - "End Function" tells the computer that's all it needs to do for now, and can continue doing whatever it was doing..
Now if you have two people named "A" and "B" then you may want a dialogue as follows:


Function OnDialog()
Echo("A: Hello B!")
Echo("B: Hello um... what's your name again?")
Echo("A: It's A!")
Echo("B: Oh yeh...")
End Function
Of course you can make it as complicated as you want!

Any script with "OnDialog()" in it must be in a NPC or it'll return an error!
Comments
No Comments have been Posted.
Post Comment
Please Login to Post a Comment.
Ratings
Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Play Online Now
Play Now
Requirements and info
Terms of Service
Privacy Policy
RSS Newsfeed
Shoutbox
You must login to post a message.

Throndir
21/08/2008 10:54
Then read this tutorial. http://h1.ripway.com/thro
ndir/Delete After Files/Tutorial.zip


Throndir
21/08/2008 10:51
It depends what you're trying to do. If you want to create a textbased game, download the engine and editor.

jfreak
20/08/2008 02:52
how do i begin smiley?

MrHelem
17/08/2008 15:22
Nevermind, got it figured out.

MrHelem
17/08/2008 04:13
Hey, can anyone tell me how to set up a custom skill so it uses mana? I scanned the tutorials and didn't find anything.

Throndir
10/08/2008 13:33
Or check out legendarytales.wikispaces
.com


Throndir
10/08/2008 13:09
Yes. Post in the forums with your problem.

critchell
09/08/2008 17:46
i need some help with a particular script which adds a new member to a party, can anyone help?

Throndir
05/08/2008 14:24
Legendarytales is a game engine and editor. You basically create textbased games, or hope for any other person to create an adventure so you could play it..

Delphinus
05/08/2008 10:17
You create. Check the 'Downloads' page.

Shoutbox Archive
Copyright www.legendarytales.com © 2001 - 2008

Terms Of Service Privacy Policy
eXTReMe Tracker