morismark Posted January 2, 2021 Share Posted January 2, 2021 (edited) I need help to find issues that causes skyrim crash.with pyrotx Sky Ai Teleporting NPCs at Skyrim Nexus - Mods and Community permission, I used him script to an NPC.This script is for NPC to use teleport in combat.I have two problems: 1) The script works well, but it, than after minutes of combat, crash the game. I'm sure of it, because without spel scripted base, the game doesn'tcrash.I've tried to set minium telport activation, but nothing. this is him script:Scriptname teleportability extends activeMagicEffectimport GameImport Utility;=========================================================================================; PROPERTIES;============================Activator property teleportActivator Auto{The activator that will be placed and teleported to}Activator property TeleportFXStart Auto{The Fx that will be placed before teleporting}Activator property TeleportFXFinish Auto{The Fx that will be placed after teleporting}Int Property TeleportChance = 20 Auto{The Chance that an NPC will be able to use this ability (Default 20) + 2/3's of the NPC's Level}Int Property TeleportChanceHit = 60 Auto{If allowed to teleport at all, this is the chance to be allowed to teleport by being hit (Default 60)}Int Property TeleportChanceTimed = 60 Auto{If allowed to teleport at all, this is the chance to be allowed to teleport on a timer (Default 60)}Int Property CountMin = 3 Auto{Minimum number of times the script updates before teleporting (Default 3)}Int Property CountMax = 7 Auto{Maximum number of times the script updates before teleporting (Default 7)}Int Property HitCountMin = 2 Auto{Minimum number of hits until teleport (Default 3)}Int Property HitCountMax = 7 Auto{Maximum number of hits until teleport (Default 7)}Float Property UpdateTime = 2.5 Auto{How often the script updates (Default 2.5 seconds)}Float Property fRadius = 2048.0 Auto{Radius to search for a teleport point (2048.0 Auto)}Bool Property bTimebased = True Auto{Allows user to teleport after the script updates a certain number of times. (Default True)}Bool Property bHitbased = True Auto{Allows user to teleport after being hit a certain number of times. (Default True)};=========================================================================================; VARIABLES;============================ObjectReference ActivatorRefObjectReference casterRefObjectReference FXStartLocObjectReference FXFinishLocObjectReference targetLocactor casterint RandTeleportint RandTeleportHitint RandTeleportTimedint hitCountint updateCounterint teleportTimedint teleportHitint level;=========================================================================================; EVENTS;============================Event OnEffectStart(Actor akTarget, Actor akCaster)caster = akCastercasterRef = (caster as ObjectReference)level = (caster.getLevel() * 2/3)RandTeleport = Utility.RandomInt(0,100)if RandTeleport <=(TeleportChance + (level as Int))ActivatorRef = casterRef.placeAtMe(teleportActivator)RandTeleportHit = Utility.RandomInt(0,100)RandTeleportTimed = Utility.RandomInt(0,100)if RandTeleportHit <= TeleportChanceHitbHitBased = trueelseIf RandTeleportHit > TeleportChanceHitbHitBased = falseendIfif RandTeleportTimed <= TeleportChanceTimedbTimeBased = trueelseIf RandTeleportTimed > TeleportChanceTimedbTimeBased = falseendIfif bTimeBased == trueupdateCounter = 0teleportTimed = Utility.RandomInt(CountMin, CountMax)endIfif bHitBased == truehitCount = 0teleportHit = Utility.RandomInt(HitCountMin, HitCountMax)endIfif bHitBased == True || bTimeBased == TrueregisterForSingleUpdate(0.5)endIfendIfEndEventEvent OnUpdate()ActivatorRef = casterRef.placeAtMe(teleportActivator)if caster.isInCombat() && caster.isDead() == falseif bTimeBased == TrueupdateCounter+= 1If updateCounter >= teleportTimedTeleport()updateCounter = 0teleportTimed = Utility.RandomInt(CountMin, CountMax)endifendIfActivatorRefregisterForSingleUpdate(UpdateTime)endIfEndEventEvent OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)if bHitbased == TrueHitCount += 1if HitCount >= TeleportHitTeleport()HitCount = 0if updateCounter != 0updateCounter -= 1endIfteleportHit = Utility.RandomInt(HitCountMin, HitCountMax)endIfendIfEndEventFunction Teleport()targetLoc = Game. FindRandomReferenceOfTypeFromRef(TeleportActivator, casterRef, fRadius)FXStartLoc = casterRef.placeAtMe(TeleportFXStart)FXFinishLoc = targetLoc.placeAtMe(TeleportFXFinish)FXStartLoctargetLocFXFinishLoccasterRef.moveTo(targetLoc)EndFunction 2) The ability effect works only if NPC have few spell/shout. I don't know how is possible Because it doesnt' dependent from number of spell simply because it is an ability. How can I solve? Edited January 3, 2021 by morismark Link to comment Share on other sites More sharing options...
morismark Posted January 2, 2021 Author Share Posted January 2, 2021 (edited) For the first point, CTD game, this is papyrus log: stack:[None].MannequinActivatorSCRIPT.Is3DLoaded() - "" Line ?[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108[01/02/2021 - 06:44:15PM] Warning: Assigning None to a non-object variable named "::temp15"stack:[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108[01/02/2021 - 06:44:15PM] FNIS aa SetAnimGroup mod: CombatFatigue actor: [ActorBase < (1F2BEDAA)>] group: _bowidle base: 1 number: 0[01/02/2021 - 06:44:15PM] Error: Unable to call Is3DLoaded - no native object bound to the script object, or object is of incorrect typestack:[None].MannequinActivatorSCRIPT.Is3DLoaded() - "" Line ?[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108[01/02/2021 - 06:44:15PM] Warning: Assigning None to a non-object variable named "::temp15"stack:[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108[01/02/2021 - 06:44:15PM] Error: Unable to call Is3DLoaded - no native object bound to the script object, or object is of incorrect typestack:[None].MannequinActivatorSCRIPT.Is3DLoaded() - "" Line ?[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108[01/02/2021 - 06:44:15PM] Warning: Assigning None to a non-object variable named "::temp15"stack:[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108[01/02/2021 - 06:44:15PM] Error: Failed to setup moving reference because it has no parent cell or no 3Dstack:[ (FF0008CC)].ObjectReference.TranslateTo() - "" Line ?[ (FF0008CC)].ObjectReference.TranslateToRef() - "ObjectReference.psc" Line 583[ (5700F644)].kata_TimeAndSpace_TrialMaster.OnUpdate() - "kata_TimeAndSpace_TrialMaster.psc" Line 192[01/02/2021 - 06:44:15PM] Error: Unable to call Is3DLoaded - no native object bound to the script object, or object is of incorrect typestack:[None].MannequinActivatorSCRIPT.Is3DLoaded() - "" Line ?[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108[01/02/2021 - 06:44:15PM] Warning: Assigning None to a non-object variable named "::temp15"stack:[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108[01/02/2021 - 06:44:15PM] Error: Unable to call Is3DLoaded - no native object bound to the script object, or object is of incorrect typestack:[None].MannequinActivatorSCRIPT.Is3DLoaded() - "" Line ?[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108[01/02/2021 - 06:44:15PM] Warning: Assigning None to a non-object variable named "::temp15"stack:[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108[01/02/2021 - 06:44:15PM] Warning: (FF0008CC): Ref is in an unloaded cell, so it cannot cast spells..stack:[ (00045F9D)].SPELL.Cast() - "" Line ?[ (5700F644)].kata_TimeAndSpace_TrialMaster.OnUpdate() - "kata_TimeAndSpace_TrialMaster.psc" Line 194[01/02/2021 - 06:44:15PM] Error: Unable to call Is3DLoaded - no native object bound to the script object, or object is of incorrect typestack:[None].MannequinActivatorSCRIPT.Is3DLoaded() - "" Line ?[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108[01/02/2021 - 06:44:15PM] Warning: Assigning None to a non-object variable named "::temp15"stack:[None].MannequinActivatorSCRIPT.ResetPosition() - "MannequinActivatorSCRIPT.psc" Line 184[None].MannequinActivatorSCRIPT.OnCellLoad() - "MannequinActivatorSCRIPT.psc" Line 108 Edited January 3, 2021 by morismark Link to comment Share on other sites More sharing options...
Recommended Posts