Jump to content

Photo

Need Help From An Expert Scripter

skyrim adamantium forge meditation spell crafting powers

  • Please log in to reply
16 replies to this topic

#11
JetSteele

JetSteele

    The Hybrid

  • Premium Member
  • 1,600 posts
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



#12
JetSteele

JetSteele

    The Hybrid

  • Premium Member
  • 1,600 posts

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?



#13
JetSteele

JetSteele

    The Hybrid

  • Premium Member
  • 1,600 posts

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


#14
LoganWolverine

LoganWolverine

    Enthusiast

  • Premium Member
  • 211 posts
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 error
These are The error's it's creating::
 
psc(18,13): variable Input is undefined
psc(18,19): none is not a known user-defined type
psc(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 exist
psc(23,1): UnregisterForAllKeys is not a function or does not exist
 
 
ReferenceAlias Property Alias_Rusheeda  Auto
ReferenceAlias Property Alias_RusheedaRef  Auto
Actor Property playerRef  Auto
Int 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 == iSneakKey
If playerRef.IsSneaking()
FillAlias()
Else
ClearAlias()
EndIf
EndIf
EndEvent

 

 
 
Can Someone Please Help Me!!!


#15
sLoPpYdOtBiGhOlE

sLoPpYdOtBiGhOlE

    Faithful poster

  • Supporter
  • PipPipPipPip
  • 1,446 posts
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.

#16
LoganWolverine

LoganWolverine

    Enthusiast

  • Premium Member
  • 211 posts

Awww....Thank you sLoPpYdOtBiGhOlE I'll check that out right now.



#17
LoganWolverine

LoganWolverine

    Enthusiast

  • Premium Member
  • 211 posts

Yes that was the problem I had to reinstall my skse something was missing from it, Again Thank you!!!!







Also tagged with one or more of these keywords: skyrim, adamantium, forge, meditation, spell, crafting, powers

IPB skins by Skinbox
Page loaded in: 1.235 seconds