Post by SirMrChris on Jul 17, 2015 20:35:11 GMT
The following script(s) can be made so your NPCs can change what they're saying. It's a relatively simple script but surprisingly not well known:
Things You Will Need:
- CCTV Script
- SetText Script
- Wait Script
- NPC Block
- Proper Coordinates
- An Interestingly Designed Wall
To start you will have to either find the exact coordinates of the NPCs text you want to change, or their exact name.
1. As always, create a folder for your script, not naming your scripts can lead to disorganization. Which is frustrating. Label this folder something like, "Dialogue."
2. Next you will need to build a SQUARE BOX with nice looking walls, you'll only need to build four, including a ceiling and floor. Pick a wall and place a Red block on the exact middle of the wall, inside for later. Then you're going to want to go to the exact middle of your square floor and place a Red block.
3. Then you will need to create your CCTV script line:
- Create a new script inside the "Dialogue" folder and call it "Dialogue1" Then use this line:
CCTV [admin] [x,y,z] [n|s|e|w|track]
- The coordinates of the script should be just above the middle red block you placed on the floor.
- The track direction should be the direction of the wall you placed the red brick on.
If done correctly, the script should look something like:
CCTV [admin] [567,3,466]
What this does is add a nice background to your NPC when you're talking to them.
4. Now you'll need to start your SetText script. To do this first place down your NPC in the desired location and choose a name for it.
5. After that, you'll want to open up your CCTV script and place the following script line in:
SetText [x,y,z] [Loading]
- The coordinates of the NPC should already be recognized since this entire script will be put into the NPC block. So using [rel: 0,0,0] is perfectly okay here.
- To add that extra detail into your script. Complete the following:
SetText [rel: 0,0,0] [Loading]
SetText [rel: 0,0,0] [Loading.]
SetText [rel: 0,0,0] [Loading..]
SetText [rel: 0,0,0] [Loading...]
SetText [rel: 0,0,0] [Loading]
SetText [rel: 0,0,0] [Loading.]
SetText [rel: 0,0,0] [Loading..]
SetText [rel: 0,0,0] [Loading...]
6. Now place a wait script in between every line you see above. It is recommended you use Wait [300].
SetText [rel: 0,0,0] [Loading]
Wait [300]
SetText [rel: 0,0,0] [Loading.]
Wait [300]
SetText [rel: 0,0,0] [Loading..]
Wait [300]
SetText [rel: 0,0,0] [Loading...]
Wait [300]
SetText [rel: 0,0,0] [Loading]
Wait [300]
SetText [rel: 0,0,0] [Loading.]
Wait [300]
SetText [rel: 0,0,0] [Loading..]
Wait [300]
SetText [rel: 0,0,0] [Loading...]
Wait [300]
7. Next you'll want to add the actual dialogue. You can add whatever you want but here is an example:
SetText [rel: 0,0,0] [Hello]
Wait [3000]
SetText [rel: 0,0,0] [My name is SirMrChris!]
- You can change the wait time to how you see fit. But if you have a lot of text make sure the wait time is long.
8. Once you've done all this, lets look over our entire script:
CCTV [admin] [567,3,466]
SetText [rel: 0,0,0] [Loading]
Wait [300]
SetText [rel: 0,0,0] [Loading.]
Wait [300]
SetText [rel: 0,0,0] [Loading..]
Wait [300]
SetText [rel: 0,0,0] [Loading...]
Wait [300]
SetText [rel: 0,0,0] [Loading]
Wait [300]
SetText [rel: 0,0,0] [Loading.]
Wait [300]
SetText [rel: 0,0,0] [Loading..]
Wait [300]
SetText [rel: 0,0,0] [Loading...]
Wait [300]
SetText [rel: 0,0,0] [Hello]
Wait [3000]
SetText [rel: 0,0,0] [My name is SirMrChris!]
9. The last step is to finally put the "Dialogue1" script into your NPC block.
Repeating this process will effectively allow you to create your own NPCs with changing dialogue! There you go! Now, go forth onto a scripting journey!
Next time we will be talking about how to make it so the NPCs say different things everytime you talk to them!
Things You Will Need:
- CCTV Script
- SetText Script
- Wait Script
- NPC Block
- Proper Coordinates
- An Interestingly Designed Wall
To start you will have to either find the exact coordinates of the NPCs text you want to change, or their exact name.
1. As always, create a folder for your script, not naming your scripts can lead to disorganization. Which is frustrating. Label this folder something like, "Dialogue."
2. Next you will need to build a SQUARE BOX with nice looking walls, you'll only need to build four, including a ceiling and floor. Pick a wall and place a Red block on the exact middle of the wall, inside for later. Then you're going to want to go to the exact middle of your square floor and place a Red block.
3. Then you will need to create your CCTV script line:
- Create a new script inside the "Dialogue" folder and call it "Dialogue1" Then use this line:
CCTV [admin] [x,y,z] [n|s|e|w|track]
- The coordinates of the script should be just above the middle red block you placed on the floor.
- The track direction should be the direction of the wall you placed the red brick on.
If done correctly, the script should look something like:
CCTV [admin] [567,3,466]
4. Now you'll need to start your SetText script. To do this first place down your NPC in the desired location and choose a name for it.
5. After that, you'll want to open up your CCTV script and place the following script line in:
SetText [x,y,z] [Loading]
- The coordinates of the NPC should already be recognized since this entire script will be put into the NPC block. So using [rel: 0,0,0] is perfectly okay here.
- To add that extra detail into your script. Complete the following:
SetText [rel: 0,0,0] [Loading]
SetText [rel: 0,0,0] [Loading.]
SetText [rel: 0,0,0] [Loading..]
SetText [rel: 0,0,0] [Loading...]
SetText [rel: 0,0,0] [Loading]
SetText [rel: 0,0,0] [Loading.]
SetText [rel: 0,0,0] [Loading..]
SetText [rel: 0,0,0] [Loading...]
6. Now place a wait script in between every line you see above. It is recommended you use Wait [300].
SetText [rel: 0,0,0] [Loading]
Wait [300]
SetText [rel: 0,0,0] [Loading.]
Wait [300]
SetText [rel: 0,0,0] [Loading..]
Wait [300]
SetText [rel: 0,0,0] [Loading...]
Wait [300]
SetText [rel: 0,0,0] [Loading]
Wait [300]
SetText [rel: 0,0,0] [Loading.]
Wait [300]
SetText [rel: 0,0,0] [Loading..]
Wait [300]
SetText [rel: 0,0,0] [Loading...]
Wait [300]
7. Next you'll want to add the actual dialogue. You can add whatever you want but here is an example:
SetText [rel: 0,0,0] [Hello]
Wait [3000]
SetText [rel: 0,0,0] [My name is SirMrChris!]
- You can change the wait time to how you see fit. But if you have a lot of text make sure the wait time is long.
8. Once you've done all this, lets look over our entire script:
CCTV [admin] [567,3,466]
SetText [rel: 0,0,0] [Loading]
Wait [300]
SetText [rel: 0,0,0] [Loading.]
Wait [300]
SetText [rel: 0,0,0] [Loading..]
Wait [300]
SetText [rel: 0,0,0] [Loading...]
Wait [300]
SetText [rel: 0,0,0] [Loading]
Wait [300]
SetText [rel: 0,0,0] [Loading.]
Wait [300]
SetText [rel: 0,0,0] [Loading..]
Wait [300]
SetText [rel: 0,0,0] [Loading...]
Wait [300]
SetText [rel: 0,0,0] [Hello]
Wait [3000]
SetText [rel: 0,0,0] [My name is SirMrChris!]
9. The last step is to finally put the "Dialogue1" script into your NPC block.
Repeating this process will effectively allow you to create your own NPCs with changing dialogue! There you go! Now, go forth onto a scripting journey!
Next time we will be talking about how to make it so the NPCs say different things everytime you talk to them!