Difference between revisions of "Advanced Quest Tutorial"
adding to Advanced Quest Tutorial
imported>ShadowDancer m (cleaning up mistakes) |
imported>ShadowDancer (adding to Advanced Quest Tutorial) |
||
Line 249: | Line 249: | ||
==Expanding the Quest== | ==Expanding the Quest== | ||
Now it is time to add another NPC, some creatures, and some more scripting to the quest. I decided that this would make a good location for a small battle with some undead creatures. First I duplicated Hannibal Traven the same way that I duplicated the other NPC to create a ghost of Fasriel. Since I don't want anything to happen before the Player shows up, I also check the ''Initially Disabled'' checkbox and place the ghost in front of the stone that his body is hidden behind. Then I duplicated the ''LL1UndeadLvl100'' LeveledCreature list by changing the ''ID'' to ''SC1UndeadLvl100'' and removed the skeletons and zombies. I placed | Now it is time to add another NPC, some creatures, and some more scripting to the quest. I decided that this would make a good location for a small battle with some undead creatures. First I duplicated Hannibal Traven the same way that I duplicated the other NPC to create a ghost of Fasriel. Since I don't want anything to happen before the Player shows up, I also check the ''Initially Disabled'' checkbox and place the ghost in front of the stone that his body is hidden behind. Then I duplicated the ''LL1UndeadLvl100'' LeveledCreature list by changing the ''ID'' to ''SC1UndeadLvl100'', checking the ''Initially Disable'' checkbox, and removed the skeletons and zombies. I placed five of these to each side of Fasriel's ghost with the the ''Reference Editor ID'' being ''UndeadX'' where X is a number from 1 through 10. With Fasriel's ghost and the ''SC1UndeadLvl100'' markers placed, its time to move on to the scripting part of this expansion of the quest. | ||
Going back into the main script for the quest, I add three ''Short'' variables named ''Counter'', ''DoOnce'' and ''EnableRef'' as well as the additional scripting just before the ''End'' of the ''GameMode'' block: | |||
<pre> | |||
If Player.GetDistance FasrielGhostMarker > 150 && GetStage ShadowMages == 20 | |||
Return | |||
ElseIf Player.GetDistance FasrielGhostMarker < 150 && GetStage ShadowMages == 20 && EnableRef == 0 | |||
Messagebox "An eerie chill runs up your spine like some unseen force is watching you." | |||
FasrielGhostMarker.Disable | |||
Set EnableRef to 1 | |||
SCGhostFasrielRef.SetActorAlpha 0.5 | |||
SetEssential SCGhostFasriel 1 | |||
SCGhostFasrielRef.Enable | |||
Undead1.Enable | |||
Undead2.Enable | |||
EndIf | |||
If SCGhostFasrielRef.GetDisabled == 0 | |||
If SCGhostFasrielRef.IsInCombat == 1 && DoOnce == 0 | |||
Set DoOnce to 1 | |||
If Counter == 0 | |||
Undead1.Disable | |||
Undead2.Disable | |||
ElseIf Counter == 1 | |||
Undead3.Disable | |||
Undead4.Disable | |||
ElseIf Counter == 2 | |||
Undead5.Disable | |||
Undead6.Disable | |||
ElseIf Counter == 3 | |||
Undead7.Disable | |||
Undead8.Disable | |||
ElseIf Counter == 4 | |||
Undead9.Disable | |||
Undead10.Disable | |||
EndIf | |||
Set Counter to Counter + 1 | |||
EndIf | |||
If SCGhostFasrielRef.IsInCombat == 0 && DoOnce == 1 && Counter < 5 | |||
If Counter == 1 | |||
Undead3.Enable | |||
Undead4.Enable | |||
ElseIf Counter == 2 | |||
Undead5.Enable | |||
Undead6.Enable | |||
ElseIf Counter == 3 | |||
Undead7.Enable | |||
Undead8.Enable | |||
ElseIf Counter == 4 | |||
Undead9.Enable | |||
Undead10.Enable | |||
EndIf | |||
Set DoOnce to 0 | |||
EndIf | |||
EndIf | |||
</pre> | |||
This initiates and runs the battle as soon as the Player shows up at the ''FasrielGhostMarker'' activating and deactivating two of the ''SC1UndeadLvl100'' leveled lists at a time until all ten have been activated and deactivated. | |||
(*to be continued*) | (*to be continued*) |