Difference between revisions of "A beginner's guide, lesson 7 - Using Scripts in Quests"

Jump to navigation Jump to search
→‎The Final Chamber: adding sections
imported>Pyrocow2
(→‎The Final Chamber: more faction and aggro info)
imported>Pyrocow2
(→‎The Final Chamber: adding sections)
Line 618: Line 618:


==The Final Chamber==
==The Final Chamber==
 
===Setting up the resources===
This consists of a large chamber with two antechambers. In the first antechamber we create a cell by placing a door in the corridor. We can use this to house NPC ''BGBrown''. Remember, Brown must be added to the separate prisoner faction.
This consists of a large chamber with two antechambers. In the first antechamber we create a cell by placing a door in the corridor. We can use this to house NPC ''BGBrown''. Remember, Brown must be added to the separate prisoner faction.


Line 650: Line 650:
I also want to make sure that the player, no matter how good they are at sneaking, will be forced to confront Blair. How do we do this? Easy, we script it. We will also design the quest so that you will have to kill Blair to move on to the next stage. We can also do this through scripts.
I also want to make sure that the player, no matter how good they are at sneaking, will be forced to confront Blair. How do we do this? Easy, we script it. We will also design the quest so that you will have to kill Blair to move on to the next stage. We can also do this through scripts.


===Setting up Blair===
Add a new variable to the main quest script called ''BlairGreeted''. Then attach this script to the Blair NPC:<br>
Add a new variable to the main quest script called ''BlairGreeted''. Then attach this script to the Blair NPC:<br>
<pre>
<pre>
Line 700: Line 701:
  ''I have killed Blair. I should search his body for the deed and house key. I should also see if he has a key to Brown's cell. I can then return to the Imperial City to see Vilanus.''
  ''I have killed Blair. I should search his body for the deed and house key. I should also see if he has a key to Brown's cell. I can then return to the Imperial City to see Vilanus.''


===Setting up Brown===
We can set up an optional reward for players who choose to free Brown from his cell. Open up Brown's form and make sure he doesn't have a high aggression level, just to make sure Brown won't attack the player on sight. Iit should at least be lower than whatever positive disposition you gave the prisoner faction towards the player, but it wouldn't hurt to just set it to 0.
We can set up an optional reward for players who choose to free Brown from his cell. Open up Brown's form and make sure he doesn't have a high aggression level, just to make sure Brown won't attack the player on sight. Iit should at least be lower than whatever positive disposition you gave the prisoner faction towards the player, but it wouldn't hurt to just set it to 0.


Line 786: Line 788:
We will need to look at altering Brown's behavior for the final release. We will need to add some AI in the next lesson to get him to run away.
We will need to look at altering Brown's behavior for the final release. We will need to add some AI in the next lesson to get him to run away.


===Scripting the chest===
What we need to look at now is another hefty bit of scripting which will control the combination lock on the treasure chest.
What we need to look at now is another hefty bit of scripting which will control the combination lock on the treasure chest.


Anonymous user

Navigation menu