SUPER COOL NPC TALKING SYSTEM [JS]

HELLO GUYS ! Tony here and today i bring you a super easy javascript NPC TALKING SYSTEM
. all you have to put the script in the game and follow these steps :-

1* CREATE A NPC [ put a model in the scene]
2* APPLY THE POPUP SCRIPT TO IT
3* MAKE A NEW EMPTY GAME OBJECT
4* APPLY THE [empty game object] TO THE “Flame variable” [by dragging and dropping ] IN THE POPUP SCRIPT
5* IN THE EMPTY GAME OBJECT APPLY THE CHAT JAVA SCRIPT . FILL IN THE STRING VARIABLES
6* MAKE SURE THAT THERE IS A COLLIDER IN THE NPC MODEL [which will act as the talking range . so make it big] MAKE IT A TRIGGER
7* RUN THE GAME IN THE EDITOR
8* GO NEAR THE NPC AND PRESS ENTER
9* IT SHOULD WORK PROPERLY PRESS Z OR X TO REPLY
10* IF IT WORKS . THEN CREATE A GUI SKIN . GET A SOLID 2D TEXTURE AND PUT IT IN THE [GUISKIN - BOX — ON HOVER, HOVER, ACTIVE, ON ACTIVE] AND [GUISKIN - BUTTON ---- ON HOVER,ONACTIVE,ACTIVE,HOVER]

HOPE IT WORKS FOR YOU:)

FEEL FREE TO ASK IF YOU HAVE ANY PROBLEM :wink:

2554254–177720–chat.js (1.76 KB)
2554254–177721–pop up.js (255 Bytes)

Be aware that if you use the old GUI system, it doesn’t play well with the modern (4.6 and later) UI system. My game High Frontier still has the old system in a lot of places, because it’s just been too expensive to redo, but it’s become quite a thorn in my side. If I were starting fresh, I would certainly use the new UI system right from the get-go.

1 Like

HELLO ! thanks for viewing this post . This is made for UNITY 5 because most of the people prefer unity 5 and if you want to use it by editing than of course you can . If you can then just change some GUI commands them maybe it will work for UNITY 4 . Anyway you can edit it .

Right, which makes your scripts even more useless. Anyone on Unity 5 is going to prefer Unity’s new UI system. Use of OnGUI has largely become a matter of creating editor extensions and not actually creating game UIs.

Creating the layout of the new UI’s components is done from within the editor. Additionally OnGUI and Unity’s new UI don’t interact with scripts in the same fashion. It wouldn’t be a simple edit. It would be a complete rewrite.

If you haven’t watched them already I recommend going and learning the new UI.

http://unity3d.com/learn/tutorials/topics/user-interface-ui

4 Likes

But the thing is I made the script for beginners and its not for a pro user searching for ultimate one its just for newbies making a new and 1st project . I know it’s pretty old kind of but the U I system cant be shared . Its just simple gui thing . If you are searching for U I then maybe its the wrong place . BTW for giving advice i will try making new one thank you

That’s just it. The new Unity UI has far more tutorial coverage now than the old system does.

http://unity3d.com/learn/tutorials/topics/user-interface-ui

Actually you can but it may not be obvious. You simply have to export the assets using the instructions below and the user simply imports the package either through the Assets → Import Package → Custom Package menu or by dragging and dropping the .unitypackage file into the Unity editor window.

http://docs.unity3d.com/Manual/HOWTO-exportpackage.html

1 Like

the whole script dosent open

Not surprising since this is a 4-year-old thread driving an obsolete GUI system with a language that Unity no longer uses.

2 Likes