Veridious
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC NWN 2
Joined: 27 Sep 2004 From: Cambridge, Ontario |
Posted: Thursday, 05 October 2006 04:30AM |
If I wanted to make an Ettin that attacks the character, but make it so that he fights until he is "Badly Wounded" and then starts a conversation, how would I do that?
I know how to do conversations, but I'm not sure how to make it so that he turns "friendly" or "neutral" when he reaches Badly Wounded.
See, one of the conversation options for the player will be "Okay, get out of here, go home", after the ettin pleads to the character to let him go. At that point, I want the ettin to run towards the exit, and then disappear when he gets out of the player's line of sight. |
|
kevinodie
Game Owner
NWN NWN: SoU NWN: HotU
Joined: 21 Jul 2003 From: Bathos |
Posted: Thursday, 05 October 2006 04:44AM |
Uncomment (or add) this line to your ettin's OnSpawn script:
Modify this script and add it to the ettin's OnUserDefined event:
View Post/Code in separate window
--kevinodie _________________ NWN Custom Content KORE rpgEdited By kevinodie on 10/05/06 04:45 |
|
Veridious
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC NWN 2
Joined: 27 Sep 2004 From: Cambridge, Ontario |
Posted: Thursday, 05 October 2006 04:57AM |
Quote: Posted 10/05/06 04:31 (GMT) by kevinodie Uncomment (or add) this line to your ettin's OnSpawn script: I'm new to scripting. Do I go to Creature Properties > Scripts and then press ... button to the right of OnSpawn? Then what?
Quote: Modify this script and add it to the ettin's OnUserDefined event: View Post/Code in separate window --kevinodie I don't understand... |
|
kevinodie
Game Owner
NWN NWN: SoU NWN: HotU
Joined: 21 Jul 2003 From: Bathos |
Posted: Thursday, 05 October 2006 05:26AM |
Okay, since you're new to scripting I'm going to assume you don't already have any custom events firing for this ettin.
I need to know a couple of things before I post scripts for you:
1. How many Hit Points does the ettin have? 2. How much damage should the ettin sustain before it surrenders? How many HP should it have when it gives up? 3. What is the name of the ettin's dialogue file when it surrenders? And do you have some variable that needs to be set to get to the proper node in the dialogue file?
--kevinodie _________________ NWN Custom Content KORE rpg |
|
Veridious
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC NWN 2
Joined: 27 Sep 2004 From: Cambridge, Ontario |
Posted: Thursday, 05 October 2006 05:36AM |
Quote: 1. How many Hit Points does the ettin have? 243
Quote: 2. How much damage should the ettin sustain before it surrenders? 143Quote: How many HP should it have when it gives up? 100
Quote: 3. What is the name of the ettin's dialogue file when it surrenders? And do you have some variable that needs to be set to get to the proper node in the dialogue file?
--kevinodie I haven't written the conversation yet, and I don't know of any variables. |
|
kevinodie
Game Owner
NWN NWN: SoU NWN: HotU
Joined: 21 Jul 2003 From: Bathos |
Posted: Thursday, 05 October 2006 06:07AM |
Okay, here are a couple of files and a complete step by step for you.
First, the Ettin's OnSpawn script. Save this script into your Ettin's OnSpawn slot by doing the following: 1. From the toolset, select Tools -> Script Editor 2. Paste the following script into the editor
View Post/Code in separate window
3. Save it as ettin_onspawn Now the Userdefined Script 4. Paste the following script into the editor
View Post/Code in separate window
5. Save it as ettin_userdef And finally the Text Appears When conversation script 6. Paste the following script into the editor
7. Save it as taw_surrender 8. Close the script editor 9. Open the creature properties 10. Slect the scripts tab 11. Select the ... button next to the OnSpawn script event 12. Find ettin_onspawn and select open 13. Select the ... button next to the UserDefined script event 14. Find ettin_userdef and select open
Voila, done with the creature properties.
Now, when you get to it, in the conversation editor, after you create the text for the surrender dialogue, simple select taw_surrender for the Text Appears When ... script and you've got a surrendering ettin on your hands.
Hopefully that helps.
--kevinodie _________________ NWN Custom Content KORE rpgEdited By kevinodie on 10/05/06 06:09 |
|
Veridious
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC NWN 2
Joined: 27 Sep 2004 From: Cambridge, Ontario |
Posted: Thursday, 05 October 2006 07:09AM |
When I first open the Script Editor in Tools, there's already some text in the window, I deleted that and then added what you said. After I pasted one of the scripts on, I saved it as what you told me to save it as, and then I exited the script window thing. I then reopened it and did the next script.
Did I do it right? |
|
Veridious
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC NWN 2
Joined: 27 Sep 2004 From: Cambridge, Ontario |
Posted: Thursday, 05 October 2006 09:46AM |
Also, when I went in game to test the conversation, if my player chose the option "Don't stop now, fight me!" he is supposed to continue the fight with the Ettin. He does. The problem is that the Ettin is invulnverable. He cannot be damaged, all that shows are some gold-coloured 0's, to show that no damage is being done.
Also, if the player chooses to let the Ettin go, how do I make the Ettin run to the exit? |
|
kevinodie
Game Owner
NWN NWN: SoU NWN: HotU
Joined: 21 Jul 2003 From: Bathos |
Posted: Thursday, 05 October 2006 02:30PM |
Quote: Posted 10/05/06 07:26 (GMT) by Veridious
When I first open the Script Editor in Tools, there's already some text in the window, I deleted that and then added what you said. After I pasted one of the scripts on, I saved it as what you told me to save it as, and then I exited the script window thing. I then reopened it and did the next script.
Did I do it right?
Yes.
Quote: Posted 10/05/06 09:10 (GMT) by Veridious
Also, when I went in game to test the conversation, if my player chose the option "Don't stop now, fight me!" he is supposed to continue the fight with the Ettin. He does. The problem is that the Ettin is invulnverable. He cannot be damaged, all that shows are some gold-coloured 0's, to show that no damage is being done.
That's my error. In the surrender portion of the userdefined script I set the creature to plot. Remove this line from ettin_userdef
Quote: Also, if the player chooses to let the Ettin go, how do I make the Ettin run to the exit?
1. Place a waypoint at the location where the ettin should go to leave the map. This waypoint should be fairly close to the ettin, and not behind a lot of placeables so the creature can easily find the exit. 2. Change the tag of the waypoint to NW_EXIT (note the capitol letters) 3. Paste this script into the script editor
View Post/Code in separate window
4. Save it as at_escape 5. In the conversation editor, add this script as the Actions Taken for that conversation node.
Now we can either kill the ettin or let him go.
--kevinodie _________________ NWN Custom Content KORE rpg |
|
Veridious
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC NWN 2
Joined: 27 Sep 2004 From: Cambridge, Ontario |
Posted: Thursday, 05 October 2006 02:40PM |
|
Okay the problem is that in the same conversation node where the ettin thanks the player for letting him go, the ettin gives the player his spear. I have the "give reward" thing set to give the spear, so it already occupies the script for that node. Is it possible to add the at_escape script too? |
|
kevinodie
Game Owner
NWN NWN: SoU NWN: HotU
Joined: 21 Jul 2003 From: Bathos |
Posted: Thursday, 05 October 2006 02:46PM |
Quote: Posted 10/05/06 14:57 (GMT) by Veridious
Okay the problem is that in the same conversation node where the ettin thanks the player for letting him go, the ettin gives the player his spear. I have the "give reward" thing set to give the spear, so it already occupies the script for that node. Is it possible to add the at_escape script too?
Post your script and I'll show you how to combine the 2.
--kevinodie _________________ NWN Custom Content KORE rpg |
|
Veridious
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC NWN 2
Joined: 27 Sep 2004 From: Cambridge, Ontario |
Posted: Thursday, 05 October 2006 02:51PM |
View Post/Code in separate window
|
|
kevinodie
Game Owner
NWN NWN: SoU NWN: HotU
Joined: 21 Jul 2003 From: Bathos |
Posted: Thursday, 05 October 2006 02:59PM |
View Post/Code in separate window
I had to change how you were giving the player XP since we would have needed to include both nw_i0_plot as well as nw_i0_tool. However, the compiler won't let us use both since they each contain an identical function.
Luckily for you there is more than one way to reward XP.
Simply replace the current script with this one and it should do the trick.
--kevinodie _________________ NWN Custom Content KORE rpg |
|
Veridious
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC NWN 2
Joined: 27 Sep 2004 From: Cambridge, Ontario |
Posted: Thursday, 05 October 2006 03:08PM |
Okay I got that done, I'll test it in game now.
What do I do with the waypoint that I put down? |
|
kevinodie
Game Owner
NWN NWN: SoU NWN: HotU
Joined: 21 Jul 2003 From: Bathos |
Posted: Thursday, 05 October 2006 03:28PM |
Quote: Posted 10/05/06 15:33 (GMT) by Veridious
Okay I got that done, I'll test it in game now.
What do I do with the waypoint that I put down?
Right click on it -> Select Properties -> Change the tag to NW_EXIT -> Select Ok
--kevinodie _________________ NWN Custom Content KORE rpg |
|