Hi,
I am making a custom (sort of) forge system to unlock powers that are found specifically in my mod. I am making it similarly to how the greybeards learn new words of power by meditating.
Some background info. The player will unlock a spell that will allow him to meditate, when the player does this a forge system will open where he can "craft" the powers with unique ingredients found in the mod (soul fragment, dna, ect.) The forge system works fine but the second event to remove the "forge" once the player exits it doesn't fire. This issue leaves the furniture (marker) on the floor where any NPC can activate it. I used the power like crazy in whiterun market and when I went back there most of the NPC's were meditating.
I know I could remove the furniture from sandbox but then if the player uses it enough times then there will be so many meditation spots in the world that will cause lag and possibly crashing. That said the forge works perfectly, the only issue is the second script doesn't fire when the player leaves the forge to remove it from the world which will also eliminate the chances of the power reacting badly with the game.
Here is the script:
Scriptname AdamantiumScript_MeditateMarker extends ObjectReference Quest Property AdamantiumDLCMeditate Auto Spell Property Meditate Auto Event OnActivate(ObjectReference akActionRef) Debug.MessageBox("Hello, world!") if ((akActionRef as Actor).GetSitState () >= 3) if ((akActionRef as Actor) == Game.GetPlayer()) (AdamantiumDLCMeditate as AdamantiumScript_MeditateQuestScript).GetUp() endIf endIf endEvent Event OnGetUp(ObjectReference akFurniture) Debug.MessageBox("Hello, world!") Cleanup() endEvent Function Cleanup() Debug.MessageBox("Hello, world!") Game.GetPlayer().DispelSpell(Meditate) Delete() endFunction
Don't mind the debug.messagebox. That's only there because I want to see when it fires.
If anyone wants to see the other two scripts (Quest and Magic Effect) that are connected to this then I could post them. But those ones work fine, its this one that I can't get working.
Its the OnGetUp event that doesn't fire. Also I tried specifying what akFurniture was but I kept getting an error saying that ObjectReference can't be linked to Furniture.
Anyways, anyone who can help is greatly appreciated. Sorry for the giant wall of text, just wanted to be as thorough as possible.