Jump to content

Item script not executing


Recommended Posts

I've run into an embarrassing issue. I had a script on an item working for a few days, and was tinkering with it last night. I woke up this morning and the script no longer executes when the item is used. No errors are reported in the compiler, and there are no errors at startup. I've tried loading the item onto a fresh save, but the script still doesn't execute.

 

I've attached some screenshots of the item, and magiceffect. The script is as follows:

Scriptname ReboundEffectScript:ReboundEffectScript extends activemagiceffect

Potion property Rebound Auto
Bool property isSilent Auto
Static property xMarker auto
ObjectReference TeleportDestination
Perk Property NoFallingDamage Auto Const 

Event OnEffectStart(Actor akTarget, Actor akCaster)
	debug.notification("OnEffectStart()")
	GetRebound(Game.GetPlayer(), Game.GetPlayer())
	DropMarkers(Game.GetPlayer(), Game.GetPlayer())
EndEvent

Event OnEffectFinish(Actor akTarget, Actor akCaster)
	ReboundReturn(Game.GetPlayer(), Game.GetPlayer())
EndEvent


Function GetRebound(Actor akTarget, Actor akCaster)
	debug.notification("GetRebound()")
	Game.GetPlayer().AddItem(Rebound, 1, isSilent)
EndFunction

Function DropMarkers(Actor target, Actor caster)
	Debug.notification("DropMarkers()")
	TeleportDestination = target.PlaceAtMe(xMarker, abDeleteWhenAble = True)
EndFunction

Function ReboundReturn(Actor target, Actor caster)
	debug.notification("ReboundReturn()")
	target.AddPerk(NoFallingDamage)
    	target.TranslateToRef(TeleportDestination, 10000)
	target.RemovePerk(NoFallingDamage)
	debug.notification("Script ended")
EndFunction

Things I've tested so far:

  • Testing the item on a fresh save.
  • Reinstalling the game multiple times.
  • Reinstalling the CK multiple times.
  • Deleting the item and making it again from scratch
  • Checked to see if scripts on other items were still executing. They are, but any changes I make to them do not occur in-game, even on a fresh save. I added a debug.messagebox() to the script for Jet, and although the UI elements were called from the script, the messagebox did not occur.
Link to comment
Share on other sites

Do you remember what changes you made? Or least as far back as you can remember? Looking at your script, it's hard to deduce what could be the cause without knowing what was changed, as it looks ok from my end in its current state. Did any of the notifications go off?

 

Though I feel that it is possible your marker is no longer being dropped.

Edited by Rasikko
Link to comment
Share on other sites

Do you remember what changes you made? Or least as far back as you can remember? Looking at your script, it's hard to deduce what could be the cause without knowing what was changed, as it looks ok from my end in its current state. Did any of the notifications go off?

 

Though I feel that it is possible your marker is no longer being dropped.

 

The script was working before, in particular the XMarker was working. The only change I've made was adding and removing scripts from the magic-effect (Same code, but removed briefly to test something). I thought that I'd bugged the item and needed to use a fresh save, but even that hasn't worked.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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