JetSteele Posted August 13, 2014 Author Share Posted August 13, 2014 Compiling "AdamantiumScript_MeditateMarker"... C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\AdamantiumScript_MeditateMarker.psc(20,19): cannot compare a objectreference to a furniture (cast missing or types unrelated) No output generated for AdamantiumScript_MeditateMarker, compilation failed. Same issue, here is the code Link to comment Share on other sites More sharing options...
JetSteele Posted August 14, 2014 Author Share Posted August 14, 2014 Ok, I've tweeked the scripts and this is where I am at... Furniture Script Scriptname AdamantiumScript_MeditateMarker extends ObjectReference Spell Property Meditate Auto Event OnActivate(ObjectReference akActionRef) Debug.MessageBox("Hello, world!") if ((akActionRef as Actor).GetSitState () >= 3) if ((akActionRef as Actor) == Game.GetPlayer()) endIf endIf Disable() Game.GetPlayer().DispelSpell(Meditate) endEvent Magic Effect Script Scriptname AdamantiumScript_MeditationEnter extends activemagiceffect Conditional Furniture Property MeditateMarker Auto Event OnEffectStart(Actor akTarget, Actor akCaster) if (akTarget == Game.GetPlayer()) ((akTarget as Actor).PlaceAtMe(MeditateMarker, 1, true, false) as ObjectReference).Activate((akTarget as Actor), false) endIf endEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) if ((akTarget) == Game.GetPlayer()) Cleanup() endIf EndEvent Function Cleanup() Debug.Messagebox("TopOfTHeWorld") endFunction A lot cleaner and a lot smaller than what they used to be. They work better though, I made the furniture script disable the item so then the NPC's cannot use it however I would like to put the delete() inside the cleanup function which is now inside the magiceffect script. When I do put it there it gives me an error that delete isn't a function even when I write it like this: MeditateMarker.Delete() is there a way to do it? or do I have to do the delete from the furniture script? Link to comment Share on other sites More sharing options...
JetSteele Posted August 14, 2014 Author Share Posted August 14, 2014 To who may read this: Ok, after breaking my head on this I finally got the spell to work the way I wanted it to. I have one last issue, the animation for the meditation doesn't play at all. Fix one issue and gain another (takes a deep breath), if someone can help me to get the animation of meditating to play let me know. Sorry for the wall of text I still didn't figure out how to use the spoiler tags. Here are the new scripts: Magic Effect Scriptname AdamantiumScript_MeditationEnter extends ActiveMagicEffect ObjectReference Property MeditateMarker Auto ObjectReference Property MeditateTeleportLocation Auto Event OnEffectStart(Actor akTarget, Actor akCaster) if (akTarget == Game.GetPlayer()) ((akTarget as Actor).PlaceAtMe(MeditateMarker, 1, true, false)) MeditateMarker.Is3DLoaded() MeditateMarker.Activate((akTarget as Actor), false) endIf endEvent Event OnEffectFinish(Actor akTarget, Actor akCaster) CleanUp() EndEvent Function CleanUp() MeditateMarker.Disable(True) Utility.Wait(1.0) MeditateMarker.MoveTo(MeditateTeleportLocation) MeditateMarker.Enable() endFunction Furniture Scriptname AdamantiumScript_MeditateMarker extends ObjectReference Spell Property Meditate Auto ReferenceAlias [] Property PlayerMeditate Auto Actor Property Meditator Auto Hidden Bool Property Busy = false Auto Hidden Conditional Bool Property MeditatePlayer = true Auto Hidden Conditional Int Counter = 0 Event OnActivate(ObjectReference akActionRef) if ((akActionRef as Actor).GetSitState () >= 3) if ((akActionRef as Actor) == Game.GetPlayer()) GetUp() endIf endIf endEvent Function GetUp() if !Busy Busy = true Counter = PlayerMeditate.Length While Counter > 0 Counter -= 1 if PlayerMeditate[Counter].GetActorRef() Meditator = PlayerMeditate[Counter].GetActorRef() PlayerMeditate[Counter].Clear() Meditator.EvaluatePackage() Meditator = None endif endWhile Busy = false endif EndFunction Link to comment Share on other sites More sharing options...
LoganWolverine Posted October 23, 2015 Share Posted October 23, 2015 I'm having a bit of a problem with this script not wanting to compile because it won't recognize the "Input" @ Input.GetMappedKey("Sneak")now I have read this directly off the creation kit wiki and everything in this line is the same as the wiki so why is the creation kit kicking it out??? as a errorThese are The error's it's creating:: psc(18,13): variable Input is undefinedpsc(18,19): none is not a known user-defined typepsc(18,1): type mismatch while assigning to a int (cast missing or types unrelated)psc(19,1): RegisterForKey is not a function or does not existpsc(23,1): UnregisterForAllKeys is not a function or does not exist ReferenceAlias Property Alias_Rusheeda AutoReferenceAlias Property Alias_RusheedaRef AutoActor Property playerRef AutoInt iSneakKey Function FillAlias()Alias_Rusheeda.Clear()Alias_Rusheeda.ForceRefTo(Alias_RusheedaRef.GetReference())EndFunction Function ClearAlias()Alias_Rusheeda.Clear()EndFunction Function RegisterForSneak()iSneakKey = Input.GetMappedKey("Sneak")RegisterForKey(iSneakKey)EndFunction Function UnregisterForSneak()UnregisterForAllKeys()EndFunction Event OnKeyUp(Int KeyCode, Float HoldTime)If KeyCode == iSneakKeyIf playerRef.IsSneaking()FillAlias()ElseClearAlias()EndIfEndIfEndEvent Can Someone Please Help Me!!! Link to comment Share on other sites More sharing options...
sLoPpYdOtBiGhOlE Posted October 23, 2015 Share Posted October 23, 2015 Check your SKSE install. The functions it's failing on are all SKSE functions. This would indicate your install of skse is missing the source scripts or your skse is not up to date or you don't have skse installed. Whichever it may be it's SKSE related. Link to comment Share on other sites More sharing options...
LoganWolverine Posted October 23, 2015 Share Posted October 23, 2015 Awww....Thank you sLoPpYdOtBiGhOlE I'll check that out right now. Link to comment Share on other sites More sharing options...
LoganWolverine Posted October 23, 2015 Share Posted October 23, 2015 Yes that was the problem I had to reinstall my skse something was missing from it, Again Thank you!!!! Link to comment Share on other sites More sharing options...
Recommended Posts