Jump to content

SurfsideNaturals

Premium Member
  • Posts

    50
  • Joined

  • Last visited

Nexus Mods Profile

About SurfsideNaturals

Profile Fields

  • Country
    None

SurfsideNaturals's Achievements

Contributor

Contributor (5/14)

0

Reputation

  1. Yes, If the OnUnEquipped() event is not firing either, under your conditions, then you can just put a condition on the perk so it will only work when the shield is equipped. Put Debug.Notifications on both events and test them. I would also like to see your script on the items. Keep in mind ,if you equip an item right out of a container the OnEquipped() event will not fire consistently.
  2. Have you tested if the OnUnEquipped() event is firing under the same conditions? When you equip the two handed weapon does the OnUnEquipped() event fire? When you equip the two handed sword and then look in the menu, are the little arrows still pointing at the shield and sword? I suspect if you tested this with two one handed swords the event would fire when equipped from the favorites menu.
  3. Hey anb2004, To put it bluntly. Your script is a mess. This is ok. You are just learning. Please explain exactly what you want your script to do and how you think the script you have created will accomplish it.
  4. When doing something like this use "else" . if akActivator.getItemCount(ArmorA) && akActivator.getItemCount(ArmorB) Else ; Do something here. You do not have both items. EndIf It would be best if you included your entire script.
  5. This script will work just fine on a weapon in the players left hand. Please try the script before commenting on it. You do not need two variables. Using the global variable to count the uses is a much better idea. You can also use it in your message. Your problem is not a glitch, I told you why your count is off. If you are dual wielding, you will need to determine exactly which sword is being swung. You have stated that certain power events will not fire if a sword is swung from the left hand. So check which hand the sword is in and then use the appropriate events to catch the swing. Meaning, If the sword that is in your effect is not swinging, then the events will not fire on it. https://www.creationkit.com/index.php?title=GetEquippedWeapon_-_Actor If PlayerREF.GetEquippedWeapon(True) == Xsword ; Left Events that will catch the power animation events in the left hand. EndIf If PlayerREF.GetEquippedWeapon() == Xsword ; Right Events that will only catch the power animation events in the right hand. EndIf Now you know exactly which sword was swung and can apply the proper count and spell. Scriptname aXMDDwarvenXElectrocutionerFx extends activemagiceffect {Casts the 1H Dwarven X Sword Projectile} Message Property CoreChargedMSG Auto Message Property CoreDepletedMSG Auto GlobalVariable Property EnergyCount Auto Spell Property SpellHoriz auto Actor Property PlayerREF Auto Weapon Property Xsword Auto ;Int ECount Event OnEffectStart(Actor akTarget, Actor akCaster) registerForAnimationEvent(PlayerREF, "WeaponSwing") registerForAnimationEvent(PlayerREF, "WeaponLeftSwing") EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) ;; EndEvent Event OnAnimationEvent(ObjectReference akSource, string EventName) ;EventName == "WeaponSwing" || EventName == "WeaponLeftSwing" You only registered these so you do not need to check for them. ;Please test this and see if the script fires on "unregisted events". ; If akSource == PlayerREF As ObjectReference ; only the play was registered, you really do not need this. ; Else ; Return ; EndIf If PlayerREF.GetAnimationVariableBool("bAllowRotation") Else Return EndIf If PlayerREF.GetEquippedWeapon(True) == Xsword || PlayerREF.GetEquippedWeapon() == Xsword Else Return EndIf If EnergyCount.GetValue() < 11 SpellHoriz.cast(PlayerREF) EnergyCount.Mod(1.0) Else Debug.Notification("DEPLETED") Utility.Wait(30.0) If PlayerREF.GetEquippedWeapon(True) == Xsword || PlayerREF.GetEquippedWeapon() == Xsword Debug.Notification("CHARGED") EndIf EnergyCount.setvalue(0) EndIf EndEvent
  6. You are using animation events. The magic effect is on the player. If you are dual wielding two one handed weapons, how is the game supposed to know which animation event to fire on which magic effect? Can you tell the exact weapon that is being swung? I do not see this script being able to do that. Please include all of the script associated with this. You might also consider finding the actual power attack events instead of this ( PlayerREF.GetAnimationVariableBool("bAllowRotation") ) Scriptname aXMDDwarvenXElectrocutionerFx extends activemagiceffect {Casts the 1H Dwarven X Sword Projectile} Message Property CoreChargedMSG Auto Message Property CoreDepletedMSG Auto GlobalVariable Property EnergyCount Auto Spell Property SpellHoriz auto Actor Property PlayerREF Auto Weapon Property Xsword Auto ;Int ECount Event OnEffectStart(Actor akTarget, Actor akCaster) registerForAnimationEvent(PlayerREF, "WeaponSwing") registerForAnimationEvent(PlayerREF, "WeaponLeftSwing") EndEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) ;; EndEvent Event OnAnimationEvent(ObjectReference akSource, string EventName) ;EventName == "WeaponSwing" || EventName == "WeaponLeftSwing" You only registered these so you do not need to check for them. ;Please test this and see if the script fires on "unregisted events". ; If akSource == PlayerREF As ObjectReference ; only the play was registered, you really do not need this. ; Else ; Return ; EndIf If PlayerREF.GetAnimationVariableBool("bAllowRotation") Else Return EndIf If PlayerREF.IsEquipped(Xsword As Form) ; If the player is swinging a weapon any equipped sword will be out. You really do not need this because the effect will be added and removed when the sword is equipeed and unequipped. Else Return EndIf If EnergyCount.GetValue() < 10 SpellHoriz.cast(PlayerREF) EnergyCount.Mod(1.0) Else Debug.Notification("DEPLETED") Utility.Wait(30.0) If PlayerREF.IsEquipped(Xsword As Form) Debug.Notification("CHARGED") EndIf EnergyCount.setvalue(0) EndIf EndEvent
  7. https://www.creationkit.com/index.php?title=OnPlayerFastTravelEnd_-_Actor
  8. Yes, You will need an on activate script to have the blessing applied. Tutorials are nice, and there are many that could help you with this, but you can also have a look in the CK at things that do something similar to what you want to do. Here is a script from an alter. You could also look at a blessing spell and magic effect to make sure you have yours set up properly. Scriptname TempleBlessingScript extends ObjectReference Conditional Spell Property TempleBlessing Auto Event OnActivate(ObjectReference akActionRef) TempleBlessing.Cast(akActionRef, akActionRef) if akActionRef == Game.GetPlayer() AltarRemoveMsg.Show() BlessingMessage.Show() endif EndEvent Message Property BlessingMessage Auto Message Property AltarRemoveMsg Auto As Maxarturo stated a throne will fire the event more than once. Scriptname ThroneScript extends ObjectReference Spell Property DavesSpell Auto Event OnActivate(ObjectReference akActionRef) If akActionRef == Game.GetPlayer() As ObjectReference ; Is this the player? Else Return Endif ; https://www.creationkit.com/index.php?title=GetSitState_-_Actor If (akActionRef as actor).GetSitState() == 2 ; Only do if the player is staring to sit. Else Return Endif DavesSpell.Cast(akActionRef, akActionRef) ; add any messages you want to display here. EndEvent
  9. This is the text that you would put in your message. - You have fired %.0f projectiles. Int ProjectilesFired Message Property MaxMessage Auto MaxMessage.Show(ProjectilesFired As Float) I do not see how this requires you to display a 100 different #s at the same time. Even if you did you would just use more messages.
  10. You can show #s in a message. Yes this can be done. https://www.creationkit.com/index.php?title=Show_-_Message Int MaxCount Message Property MaxMessage Auto MaxMessage.Show(MaxCount As Float) This is the text that you would put in your message. - The Maxarturo count is %.0f .
  11. Hey Maxarturo, It is. Can you show me an example of the script? int Count Debug.Notification("Max Count = " + Count as Int )
  12. That is why it is important to streamline your scripts. Have a look at this script. You are duplicating functions. ( P.GetItemCount(_00E_YerosCave_SiraSoulbender) ). Function AddGem(ObjectReference P) ;=> I somewhat liked to do all stuff here as of having it easier to track and fix issues. ;=> So I got rid of the FindGem() function. if SiraSoulGemFunctions.ycInt_SiraSoulCounter > 49 ;=> Quest Script Variable :) P.Additem(_00E_WishWell_FrostcliffTavern_BrokenSoulgem, 1, True) SiraSoulGemFunctions.ycInt_SiraSoulCounter = -1 elseif SiraSoulGemFunctions.ycInt_SiraSoulCounter > -1 if UI.IsMenuOpen("InventoryMenu") ;=> A Soul Gem can only be used in inventory menu int[] SoulGemC = new int[6] ;=> Used to take care of eventualities. SoulGemC[0] = P.GetItemCount(_00E_YerosCave_SiraSoulbender) ;=> Like being in a filling process and SoulGemC[1] = P.GetItemCount(SoulGemArray[0]) ;=> quickly opening the menu. SoulGemC[2] = P.GetItemCount(SoulGemArray[1]) ;=> That would have resulted in multiple gems being SoulGemC[3] = P.GetItemCount(SoulGemArray[2]) ;=> added. Now we only have one. SoulGemC[4] = P.GetItemCount(SoulGemArray[3]) SoulGemC[5] = P.GetItemCount(SoulGemArray[4]) if (SoulGemC[0] + SoulGemC[1] + SoulGemC[2] + SoulGemC[3] + SoulGemC[4] + SoulGemC[5]) == 0 P.AddItem(_00E_YerosCave_SiraSoulbender, 1, True) endif endif endif int GC = P.GetItemCount(_00E_YerosCave_SiraSoulbender) If GC > 1 ;=> Just to be sure we only have one empty gem in inventory. ^^ P.RemoveItem(_00E_YerosCave_SiraSoulbender, GC - (GC - 1), true) EndIf ;=> Thanks for making me aware that Papyrus likes firing on weird eventualities. XD EndFunction You do not need to add all of the gems and the way it is done the code has to check every single gem before it finises. It should be set up so it returns a gem as soon as it finds one. if (SoulGemC[0] + SoulGemC[1] + SoulGemC[2] + SoulGemC[3] + SoulGemC[4] + SoulGemC[5]) == 0 P.AddItem(_00E_YerosCave_SiraSoulbender, 1, True) endif Like this for example: if UI.IsMenuOpen("InventoryMenu") ;=> A Soul Gem can only be used in inventory menu if IsFilling() else P.AddItem(_00E_YerosCave_SiraSoulbender, 1, True) endif endif Bool Function IsFilling int i While i < 5 If P.GetItemCount(SoulGemArray[i]) Return True EndIf i = i + 1 EndWhile EndFunction
  13. Now that you are removing the filled gem when you fill, this script is going to be more complicated and take some time to get right. What if someone, when in the middle of trapping souls, went into the menu and filled a weapon? It may be a good idea to set a state on your script when you remove the gem during filling instead of your current idea. ;This goes on your soul trapping script. ;You will need to create the PlayerAlias property and fill it. _00E_YC_PlayerAlias_GemCheckSCR s = PlayerAlias as _00E_YC_PlayerAlias_GemCheckSCR s.GoToState("Filling") ;Remove the gem s.GoToState("") ;This state will go on your _00E_YC_PlayerAlias_GemCheckSCR script State Filling Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer) endEvent EndState This could result in more than one gem being left in the players inventory. This = 1 ( GC - (GC - 1) ) P.RemoveItem(_00E_YerosCave_SiraSoulbender, GC - (GC - 1), true)
  14. Please explain exactly what the script is doing that you do not want it to do and exactly when it is happening. The gems are dropped and placed in containers when in menu also.
  15. You should always test a cell in COC before doing any further problem solving.
×
×
  • Create New...