Jump to content

Recruiting a scripter - Revolutionary mod - Will credit U


DavideMitra

Recommended Posts

You shouldn't need to add any properties, but you will need to fill them out. They should all auto-fill, except potentially the global variable depending on what you named it.

 

Uhm...there must be something wrong.

I removed the two brackets, like @FrankFamily said.

However, when I place the script on the trigger tab, it appears a blue cross near the script name (I'm not a scripter, but I use lots of vanilla default scripts and I've never seen that symbol before).

Also, from the specific little screen I can't see any properties, and, of course, the autofill-all box can't be interacted with.

Yes, of course I could add new properties, but they would be a copy of the other ones I've already wrote in Papyrus. That doesn't make any sense to me.

 

Here's the script. I didn't find other brackets. I can't see orthographic errors or things like that. Strange...

 

Scriptname LevionteA extends ObjectReference

Event OnTriggerEnter(ObjectReference akTriggerRef)

 

If akTriggerRef == PlayerRef

 

If PlayerRef.HasSpell(VampireSunDamage01)

PlayerRef.RemoveSpell(VampireSunDamage01)

VampSunDamageGlobal.SetValue(1)

 

ElseIf PlayerRef.HasSpell(VampireSunDamage02)

PlayerRef.RemoveSpell(VampireSunDamage02)

VampSunDamageGlobal.SetValue(2)

 

ElseIf PlayerRef.HasSpell(VampireSunDamage03)

PlayerRef.RemoveSpell(VampireSunDamage03)

VampSunDamageGlobal.SetValue(3)

 

ElseIf PlayerRef.HasSpell(VampireSunDamage04)

PlayerRef.RemoveSpell(VampireSunDamage04)

VampSunDamageGlobal.SetValue(4)

 

Else

Return

 

EndIf

 

EndIf

 

EndEvent

 

Actor Property PlayerRef Auto

Spell Property VampireSunDamage01 Auto

Spell Property VampireSunDamage02 Auto

Spell Property VampireSunDamage03 Auto

Spell Property VampireSunDamage04 Auto

GlobalVariable Property VampSunDamageGlobal Auto

 

Event OnTriggerLeave(ObjectReference akTriggerRef)

 

If akTriggerRef == PlayerRef

 

int SunD = VampSunDamageGlobal.GetValueInt()

 

If SunD == 1

PlayerRef.AddSpell(VampireSunDamage01)

 

ElseIf SunD == 2

PlayerRef.AddSpell(VampireSunDamage02)

 

ElseIf SunD == 3

PlayerRef.AddSpell(VampireSunDamage03)

 

ElseIf SunD == 4

PlayerRef.AddSpell(VampireSunDamage04)

 

Else

Return

 

EndIf

 

EndIf

 

EndEvent

 

Actor Property PlayerRef Auto

Spell Property VampireSunDamage01 Auto

Spell Property VampireSunDamage02 Auto

Spell Property VampireSunDamage03 Auto

Spell Property VampireSunDamage04 Auto

GlobalVariable Property VampSunDamageGlobal Auto

 

Edited by DavideMitra
Link to comment
Share on other sites

You still have all the properties twice (between the events and below them). I prefer to put them below scriptname line, Levionte puts them at the bottom, doesn't matter where but only once.

Once you have that and click save it should compile fine, if not, post the compile output. Then on the properties button and you should see them and be able to fill them, autofill should handle all of them, as Levionte said, if you named the global differently just fill it manually.

The process is explained further in these tutorials: http://www.creationkit.com/index.php?title=Category:Bethesda_Scripting_Tutorial_Series

Scriptname LevionteA extends ObjectReference 

Actor Property PlayerRef Auto
Spell Property VampireSunDamage01 Auto
Spell Property VampireSunDamage02 Auto
Spell Property VampireSunDamage03 Auto
Spell Property VampireSunDamage04 Auto
GlobalVariable Property VampSunDamageGlobal Auto

Event OnTriggerEnter(ObjectReference akTriggerRef)
    If akTriggerRef == PlayerRef
        If PlayerRef.HasSpell(VampireSunDamage01)
            PlayerRef.RemoveSpell(VampireSunDamage01)
            VampSunDamageGlobal.SetValue(1)
        ElseIf PlayerRef.HasSpell(VampireSunDamage02)
            PlayerRef.RemoveSpell(VampireSunDamage02)
            VampSunDamageGlobal.SetValue(2)   
        ElseIf PlayerRef.HasSpell(VampireSunDamage03)
            PlayerRef.RemoveSpell(VampireSunDamage03)
            VampSunDamageGlobal.SetValue(3)
        ElseIf PlayerRef.HasSpell(VampireSunDamage04)
            PlayerRef.RemoveSpell(VampireSunDamage04)
            VampSunDamageGlobal.SetValue(4)
        Else
            Return

        EndIf

    EndIf

EndEvent

Event OnTriggerLeave(ObjectReference akTriggerRef)
    If akTriggerRef == PlayerRef
        int SunD = VampSunDamageGlobal.GetValueInt()
   
        If SunD == 1
            PlayerRef.AddSpell(VampireSunDamage01)

        ElseIf SunD == 2
            PlayerRef.AddSpell(VampireSunDamage02)
        ElseIf SunD == 3
            PlayerRef.AddSpell(VampireSunDamage03)

        ElseIf SunD == 4
            PlayerRef.AddSpell(VampireSunDamage04)
        Else
            Return

        EndIf

    EndIf

EndEvent
 
Link to comment
Share on other sites

YESSS!!!

Guys it worked, thank you so much!

 

Unfortunately, today I don't have much time, but I will try to edit the script so that we can add a counter effect instead of removing the 4 sunlight spells.

 

I have some minutes...so...in your opinion, will this work?!

 

Scriptname LevionteA extends ObjectReference

Actor Property PlayerRef Auto
Spell Property VampireSunDamage01 Auto
Spell Property VampireSunDamage02 Auto
Spell Property VampireSunDamage03 Auto
Spell Property VampireSunDamage04 Auto

Spell Property MYCOUNTERSPELL01 Auto

Spell Property MYCOUNTERSPELL02 Auto

Spell Property MYCOUNTERSPELL03 Auto

Spell Property MYCOUNTERSPELL04 Auto
GlobalVariable Property VampSunDamageGlobal Auto

Event OnTriggerEnter(ObjectReference akTriggerRef)
If akTriggerRef == PlayerRef
If PlayerRef.HasSpell(VampireSunDamage01)
PlayerRef.ADDSpell(MYCOUNTERSPELL01)
VampSunDamageGlobal.SetValue(1)
ElseIf PlayerRef.HasSpell(VampireSunDamage02)
PlayerRef.ADDSpell(MYCOUNTERSPELL02)
VampSunDamageGlobal.SetValue(2)
ElseIf PlayerRef.HasSpell(VampireSunDamage03)
PlayerRef.ADDSpell(MYCOUNTERSPELL03)
VampSunDamageGlobal.SetValue(3)
ElseIf PlayerRef.HasSpell(VampireSunDamage04)
PlayerRef.ADDSpell(MYCOUNTERSPELL04)
VampSunDamageGlobal.SetValue(4)
Else
Return

EndIf

EndIf

EndEvent

Event OnTriggerLeave(ObjectReference akTriggerRef)
If akTriggerRef == PlayerRef
int SunD = VampSunDamageGlobal.GetValueInt()

If SunD == 1
PlayerRef.REMOVESpell(MYCOUNTERSPELL01)

ElseIf SunD == 2
PlayerRef.REMOVESpell(MYCOUNTERSPELL02)
ElseIf SunD == 3
PlayerRef.REMOVESpell(MYCOUNTERSPELL03)

ElseIf SunD == 4
PlayerRef.REMOVESpell(MYCOUNTERSPELL04)
Else
Return

EndIf

EndIf

EndEvent

 

Edited by DavideMitra
Link to comment
Share on other sites

Good News!

I did that edit to the script and it works like a charm!

 

There could be a minor remaining problem:

 

- I'm not sure about this... However, when vampirism stages advance and you remain all of the time inside of the triggerbox (aka you don't return to surface), it seems that the counter spells don't update along with vampiric penalties.

I noticed that when you enter the triggerbox there's a message that says "spell added to player's inventory". But if I wait two days (aka the correct time for vampirism to upgrade), no new spell will be added.

On the contrary, when I try to perform power attacks, it seems that the stamina regenerates at the same rate even if the counter spell remains the same one (maybe the game did upgrade the counter spell but it didn't notify it to the player??!!).

Unfortunately, I can't verify this problem, because on the "active effects" description tab it only appears a single effect of the counter spells (fortify magicka) and no magnitude is visible.

 

I really hope to fix this issue. Now that every kind of Dragonborn is able to visit the dungeon like if was a Vanilla one, I was thinking to add some enemies inside of the cave.

If you have any suggestions, some tips would be really appreciated

Thanks in advance

Edited by DavideMitra
Link to comment
Share on other sites

Yes, the trigger box should only react to enter/exit so stage changes within will go unnoticed. I guess the only solution would be polling. There's OnTrigger: http://www.creationkit.com/index.php?title=OnTrigger_-_ObjectReference that is supposed to fire repeatedly while within the trigger box but no idea of its frecuency, could be too much performance hit, might be better to do a standard update loop.

 

And i'd still go with removal spell method instead of counter, the only problem i see with removal is that it doesn't update if stage changes while within the cave but counter method doesn't either and can add other potential issues.

 

I wanted to do some scripting practice so here is how i'd do the whole thing, it compiles fine but haven't tested it ingame. Basically like Levionte's script but with the spells in an array, picking vampirirsm stage from the vanilla quest and updating while within the cave.

ScriptName NoSunWeaknessScript Extends ObjectReference

Actor Property PlayerRef Auto

Spell[] Property VampireSunDamage0X Auto
{Filled with 0= VampireSunDamage01, 1= VampireSunDamage02, 2= VampireSunDamage03, 3= VampireSunDamage04}

PlayerVampireQuestScript Property PlayerVampireQuest Auto
{An alternative to getting the stage based on what spells the player has would be to get them from the vampire quest itself}

Int property VampireStage; this full property should return the stage from the vanilla quest (i havent used full properties before)
 Int Function Get()
  Return PlayerVampireQuest.VampireStatus ; this goes 0= non vampire, 1-4 = vampire stages
 EndFunction
EndProperty

Int LastStage
Float CheckFrecuency = 10.0 ; could be made faster, not sure whats the optimal for this
Bool InTrigger = False ; this is to ensure they trigger in the appropiate order, should reduce the chances of messing up.

Event OnTriggerEnter(ObjectReference akTriggerRef)
 if !(InTrigger) && (akTriggerRef == PlayerRef) && (VampireStage > 0)
   InTrigger = True
   LastStage = VampireStage
   PlayerRef.RemoveSpell(VampireSunDamage0x[LastStage - 1]); remove the spell of your current stage
   RegisterForSingleUpdate(CheckFrecuency)
 endif
EndEvent

Event OnTriggerLeave(ObjectReference akTriggerRef)
 if (InTrigger) && (akTriggerRef == PlayerRef) && (VampireStage > 0)
   InTrigger = False
   PlayerRef.AddSpell(VampireSunDamage0X[VampireStage - 1]) ;add the spell of  your current stage
 endif
EndEvent

Event OnUpdate()
 If (InTrigger)
  If (VampireStage != LastStage)
   LastStage = VampireStage
   PlayerRef.RemoveSpell(VampireSunDamage0x[LastStage - 1]); remove the spell of your current stage
  Endif
  RegisterForSingleUpdate(CheckFrecuency) ; continue the loop
 Endif
EndEvent
Link to comment
Share on other sites

I've tried to copy it without the { brackets and the CK crashed.

I've also tried to copy it without the ;sign(followed by your explanations) and it still crashed. (The ; shouldn't create any problems, I've seen it lots of times, but I did a try with it, just in case)

 

 

Finally, I've tried to read your suggestions and to think about how the script works.

In my opinion, as I can see, you did post a base script concept that must be further elaborated in Papyrus (maybe you wanted me to understand scripting mechanics, because copy & paste doesn't force me to use my intelligence and this way I will never learn much about scripting).

So, if I wasn't wrong with that, I did edit some parts of the script:

 

Actor Property PlayerRef Auto

Spell[0] Property VampireSunDamage01 Auto
Spell[1] Property VampireSunDamage02 Auto
Spell[2] Property VampireSunDamage03 Auto
Spell[3] Property VampireSunDamage04 Auto

PlayerVampireQuestScript Property PlayerVampireQuest Auto

Int property VampireStage; this full property should return the stage from the vanilla quest (i havent used full properties before)
Int Function Get(0)
Return PlayerVampireQuest.VampireStatus ; this goes 0= non vampire, 1-4 = vampire stages
Int Function Get(1)
Return PlayerVampireQuest.VampireStatus
Int Function Get(2)
Return PlayerVampireQuest.VampireStatus
Int Function Get(3)
Return PlayerVampireQuest.VampireStatus
Int Function Get(4)
Return PlayerVampireQuest.VampireStatus
EndFunction
EndProperty

Int LastStage
Float CheckFrecuency = 10.0 ; could be made faster, not sure whats the optimal for this
Bool InTrigger = False ; this is to ensure they trigger in the appropiate order, should reduce the chances of messing up.

Event OnTriggerEnter(ObjectReference akTriggerRef)
if !(InTrigger) && (akTriggerRef == PlayerRef) && (VampireStage > 0)
InTrigger = True
LastStage = VampireStage
PlayerRef.RemoveSpell(VampireSunDamage01[LastStage - 1]); remove the spell of your current stage
PlayerRef.RemoveSpell(VampireSunDamage02[LastStage - 2])
PlayerRef.RemoveSpell(VampireSunDamage03[LastStage - 3])
PlayerRef.RemoveSpell(VampireSunDamage03[LastStage - 4])
RegisterForSingleUpdate(CheckFrecuency)
endif
EndEvent

Event OnTriggerLeave(ObjectReference akTriggerRef)
if (InTrigger) && (akTriggerRef == PlayerRef) && (VampireStage > 0)
InTrigger = False
PlayerRef.AddSpell(VampireSunDamage01[VampireStage - 1]) ;add the spell of your current stage
PlayerRef.AddSpell(VampireSunDamage02[VampireStage - 2])
PlayerRef.AddSpell(VampireSunDamage03[VampireStage - 3])
PlayerRef.AddSpell(VampireSunDamage03[VampireStage - 4])
endif
EndEvent

Event OnUpdate()
If (InTrigger)
If (VampireStage != LastStage)
LastStage = VampireStage
PlayerRef.RemoveSpell(VampireSunDamage01[LastStage - 1]); remove the spell of your current stage
PlayerRef.RemoveSpell(VampireSunDamage02[LastStage - 2])
PlayerRef.RemoveSpell(VampireSunDamage03[LastStage - 3])
PlayerRef.RemoveSpell(VampireSunDamage04[LastStage - 4])
Endif
RegisterForSingleUpdate(CheckFrecuency) ; continue the loop
Endif

 

 

Of course, the CK still crashed (this time it didn't even appear an error window, it directly crashed to desktop).

Maybe I'm understanding what's wrong with this:

For example:

Event OnUpdate()
If (InTrigger)
If (VampireStage != LastStage)
LastStage = VampireStage
PlayerRef.RemoveSpell(VampireSunDamage01[LastStage - 1]); remove the spell of your current stage
PlayerRef.RemoveSpell(VampireSunDamage02[LastStage - 2])
PlayerRef.RemoveSpell(VampireSunDamage03[LastStage - 3])
PlayerRef.RemoveSpell(VampireSunDamage04[LastStage - 4])

 

The numbers (1,2,3,4) must be correct, because the script should only work if you're a vampire...and, as I understood from the upper part of your script, these are the vampire stages:

0=non-vampire

1,2,3,4=vampirism stages

Return PlayerVampireQuest.VampireStatus ; this goes 0= non vampire, 1-4 = vampire stages

 

BUT in my opinion I'm not allowed to do a list like this (playerref.removespell, playerref.removespell,etc), because these are not properties.

 

Today I did lots of tries with the script but it seems something is still wrong.

Maybe it was WAY simplier than I did...

Edited by DavideMitra
Link to comment
Share on other sites

Odd, doesn't crash my ck and it compiles fine. In any case, good oportunity to explain a couple things (I've learned papyrus from using it and have no programmer background, so anyone with more knowledge feel free to add further to it or correct stuff.)

 

--------------------------------------------------------------------------------

 

Arrays (wiki link: http://www.creationkit.com/index.php?title=Arrays_(Papyrus)) are like grouped variables/properties, so instead of having the the four VampireSunDamage01/2/3/4 properties you have one array, that I named 0X but could be named anything else, VampireSunDamageArray or whatever. Filling arrays in ck uses an special interface in which you literally add entries and fill them, like multiple properties within it. Then you can reference them with the index within the [ ] starting at 0, so [0] accesses the first "property within the array", [1] the second and so on. I prefer an array to multiple if statements but it's not critical to the functionality.

Couple images to illustrate the filling:

 

 

 

http://www.mediafire.com/convkey/3ae0/mb25md675s8stb96g.jpg

http://www.mediafire.com/convkey/ed37/qh1ctk8v34w78y66g.jpg

 

 

 

So we have the array property:

Spell[] Property VampireSunDamage0X Auto ; this is filled in ck with the four spells.

and then used like:

VampireSunDamage0X[0] => this access the first of the spells, in this case: Vampiresundamage01

And that's the reason for the -1. Vampire stages are 0,1,2,3,4 but the indexes of the array are 0,1,2,3 holding the spells for stages 1,2,3,4.

 

Regarding the full property, they are explained here: http://tesalliance.org/forums/index.php?/topic/5039-class-2-properties/

The one here should simply do the code behind "return" when you call it. You can simply do "PlayerVampireQuest.VampireStatus" instead of "VampireStage". (VampireStatus being a property within the vanilla script PlayerVampireQuestScript attached to PlayerVampireQuest) I think (given it works properly ingame) that it is more readable to call the local property and then have that "internally" do the external function call but can be also called at the beginning of each event and saved locally.

 

And regarding text within "{}" and behind ";" the first are comments that should appear when hovering over the property in the filling window in ck and the later are end-line comments, ignored by the game. Neither should cause any problems by being there.

 

--------------------------------------------------------------------------------

 

This would be a more straightforward version with the same updating functionality and picking the stage from the vanilla quest (saving all the Player.HasSpell calls). All should work with AutoFill now.

ScriptName NoSunWeaknessScript2 Extends ObjectReference

Actor Property PlayerRef Auto

Spell Property VampireSunDamage01 Auto
Spell Property VampireSunDamage02 Auto
Spell Property VampireSunDamage03 Auto
Spell Property VampireSunDamage04 Auto

PlayerVampireQuestScript Property PlayerVampireQuest Auto

Int LastStage
Float CheckFrecuency = 10.0
Bool InTrigger = False

Event OnTriggerEnter(ObjectReference akTriggerRef)
 int VampireStage = PlayerVampireQuest.VampireStatus
 if !(InTrigger) && (akTriggerRef == PlayerRef) && (VampireStage > 0)
   InTrigger = True
   LastStage = VampireStage
   If VampireStage == 1
     PlayerRef.RemoveSpell(VampireSunDamage01)
   ElseIf VampireStage == 2
     PlayerRef.RemoveSpell(VampireSunDamage02)
   ElseIf VampireStage == 3
     PlayerRef.RemoveSpell(VampireSunDamage03)
   ElseIf VampireStage == 4
     PlayerRef.RemoveSpell(VampireSunDamage04)
   Endif
   RegisterForSingleUpdate(CheckFrecuency)
 endif
EndEvent

Event OnTriggerLeave(ObjectReference akTriggerRef)
 int VampireStage = PlayerVampireQuest.VampireStatus
 if (InTrigger) && (akTriggerRef == PlayerRef) && (VampireStage > 0)
   InTrigger = False
   If VampireStage == 1
     PlayerRef.AddSpell(VampireSunDamage01, False)
   ElseIf VampireStage == 2
     PlayerRef.AddSpell(VampireSunDamage02, False)
   ElseIf VampireStage == 3
     PlayerRef.AddSpell(VampireSunDamage03, False)
   ElseIf VampireStage == 4
     PlayerRef.AddSpell(VampireSunDamage04, False)
   Endif
 endif
EndEvent

Event OnUpdate()
 int VampireStage = PlayerVampireQuest.VampireStatus
 If (InTrigger)
  If (VampireStage != LastStage)
   LastStage = VampireStage
   If VampireStage == 1
     PlayerRef.RemoveSpell(VampireSunDamage01)
   ElseIf VampireStage == 2
     PlayerRef.RemoveSpell(VampireSunDamage02)
   ElseIf VampireStage == 3
     PlayerRef.RemoveSpell(VampireSunDamage03)
   ElseIf VampireStage == 4
     PlayerRef.RemoveSpell(VampireSunDamage04)
   Endif
  Endif
  RegisterForSingleUpdate(CheckFrecuency)
 Endif
EndEvent
Link to comment
Share on other sites

Thanks for the detailed explanation! Now I understand why you did wrote that "0x"!

 

The CK is giving me some problems: I created a new script and copied your content (of course, I deleted the part with scriptname and extends), but the CK crashed to desktop. I tried this twice. Not sure what's causing this...

So, I decided to edit Levionte's script and to replace it with yours. Well...this is the only way to avoid the CK to crash.

 

I've tried the final version of your script. Unfortunatelly the game acts really weird.

If I'm waiting one day inside of the dungeon (waiting for vampirism updates), the sun weakness spell is added to my magic effects section and if I perform power attacks my stamina goes to zero forever, until nighttime comes. BUT the magicka regen bar still works like a charm, anytime.

I've tried to wait some hours (even without the wait key: T) but nothing did change.

 

I think the "CheckFrecuency" line is NOT involved because, as I already said, the magicka bar always works normally.

 

Please tell me if something comes up in your mind.

Otherwise, I guess we will use the old script (for now, the counter-spells are still there: I didn't delete them, just in case). Of course, in that case I will have to try to add the CheckFrecuency funtion, hoping it will work correctly.

However, that doesn't mean that the last script is useless. If it will work, it will be the best solution!

Edited by DavideMitra
Link to comment
Share on other sites

Went ahead and made a test plugin, my results:

 

- Entering/exiting works perfectly. The proper stage's weakness is added and removed correctly without issues.

- Updating doesn't. I added notifications to the whole script and found that the update block is running, removespell lines seem to run but the active effect remains. My hypothesis (wild speculation) is that the spell needs to be added by the vanilla quest (and the old one removed) before it can be removed by this script and it seems this order is what is messed up. Basically because currently it only compares stages and attempts to remove the spell. If the later fails it doesn't check again unless you exit and enter the cave. So i tentatively added a 3 second offset to the update block after the conditions to guarantee that this scripts runs after the vanilla one has done its thing and it seems to do it. When increasing stage within the trigger you get those 3 seconds (could be made shorter, it's a safety/convenience balance) of weakness and then it removes it appropiately.

 

So, after some testing it works pretty solidly on my end. This would be the script now (in the spoiler)

 

 

Scriptname NoVampireDamageScript extends ObjectReference  

Actor Property PlayerRef Auto

Spell Property VampireSunDamage01 Auto
Spell Property VampireSunDamage02 Auto
Spell Property VampireSunDamage03 Auto
Spell Property VampireSunDamage04 Auto

PlayerVampireQuestScript Property PlayerVampireQuest Auto

Int LastStage
Float CheckFrecuency = 10.0
Float UpdateOffset = 3.0
Bool InTrigger = False

Event OnTriggerEnter(ObjectReference akTriggerRef)
 int VampireStage = PlayerVampireQuest.VampireStatus
 if !(InTrigger) && (akTriggerRef == PlayerRef) && (VampireStage > 0)
   InTrigger = True
   LastStage = VampireStage
   If VampireStage == 1
     PlayerRef.RemoveSpell(VampireSunDamage01)
   ElseIf VampireStage == 2
     PlayerRef.RemoveSpell(VampireSunDamage02)
   ElseIf VampireStage == 3
     PlayerRef.RemoveSpell(VampireSunDamage03)
   ElseIf VampireStage == 4
     PlayerRef.RemoveSpell(VampireSunDamage04)
   Endif
   RegisterForSingleUpdate(CheckFrecuency)
 endif
EndEvent

Event OnTriggerLeave(ObjectReference akTriggerRef)
 int VampireStage = PlayerVampireQuest.VampireStatus
 if (InTrigger) && (akTriggerRef == PlayerRef) && (VampireStage > 0)
   InTrigger = False
   If VampireStage == 1
     PlayerRef.AddSpell(VampireSunDamage01, False)
   ElseIf VampireStage == 2
     PlayerRef.AddSpell(VampireSunDamage02, False)
   ElseIf VampireStage == 3
     PlayerRef.AddSpell(VampireSunDamage03, False)
   ElseIf VampireStage == 4
     PlayerRef.AddSpell(VampireSunDamage04, False)
   Endif
 endif
EndEvent

Event OnUpdate()
 int VampireStage = PlayerVampireQuest.VampireStatus
 If (InTrigger)
  If (VampireStage != LastStage)
   Utility.Wait(UpdateOffset)
   LastStage = VampireStage
   If VampireStage == 1
     PlayerRef.RemoveSpell(VampireSunDamage01)
   ElseIf VampireStage == 2
     PlayerRef.RemoveSpell(VampireSunDamage02)
   ElseIf VampireStage == 3
     PlayerRef.RemoveSpell(VampireSunDamage03)
   ElseIf VampireStage == 4
     PlayerRef.RemoveSpell(VampireSunDamage04)
   Endif
  Endif
  RegisterForSingleUpdate(CheckFrecuency)
 Endif
EndEvent

 

 

And this would be the test plugin (whose script includes the notifications for testing): http://www.mediafire.com/file/43vro8oq1mibeah/TestPlugin.7z In case you want to have a look.
The trigger box is added to the entrance of Honningbrew Meadery (coc whiterun), covering the brazier and the way to the door, the stony road is outside the trigger. In ck the activator for the trigger has "XXX" as prefix.
Link to comment
Share on other sites

Excellent work. Yep, works like a charm. Bug-free too!

Now I must study how to properly add navmeshes (it shouldn't be that difficult...this would be my first mod to include them). After that, I will fill the dungeon with some enemies and I will write some tutorial books (there are lots of hidden special features). Then the "first exterior dungeon ever" will be out here in the Nexus! Just one week, or maybe two. Not more. In any case, I will post a link here so you can see the final product.

 

You (both of you, even if FrankFamily did support me a lot and did create the final versions of the script) did contribute to the last stages of the mod development with a really essential feature and - I'm sure about that - many players will be happy and will consider the mod fully immersive because of you!

Because of the importance of what you've done, I'm not even sure how to proceed. Maybe just some credits are not that much. I was thinking to write your name in the author's box, along with mine. I will have to think about it...

 

Thanks again for your assistance and for your patience

DavideMitra

Edited by DavideMitra
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...