Jump to content

Can't get 3rdPUseStimpakOnSelfOnGround to play


Pelgar

Recommended Posts

I've tried the following as a Topic Info fragment. It compiles fine as shown below. It won't even compile if I unrem the Debug.SendAnimationEvent line.

Compiling "Fragments:TopicInfos:TIF_CompJennyIntro_010185CE"...
C:\Users\HarpD\AppData\Local\Temp\PapyrusTemp\Fragments\TopicInfos\TIF_CompJennyIntro_010185CE.psc(10,6): SendAnimationEvent is not a function or does not exist
C:\Users\HarpD\AppData\Local\Temp\PapyrusTemp\Fragments\TopicInfos\TIF_CompJennyIntro_010185CE.psc(10,6): cannot call the member function SendAnimationEvent alone or on a type, must call it on a variable
No output generated for Fragments:TopicInfos:TIF_CompJennyIntro_010185CE, compilation failed.

Following compiles but animation does not play.

Keyword Property CompJennysRevengeKW Auto Const
ReferenceAlias Property Alias_Jenny Auto Const
Idle Property _3rdPUseStimpakOnSelfOnGround Auto Const


Actor Jenny = Alias_Jenny.GetActorRef()
Jenny.PlayIdle(_3rdPUseStimpakOnSelfOnGround)
;Debug.SendAnimationEvent(Jenny, "3rdPUseStimpakOnSelfOnGround")
Jenny.AddKeyword(CompJennysRevengeKW)

I've also tried to get it to play as the On Begin and as the On End Idle in a package. Oddly it is one of the idles that plays fine in the preview when adding to package.

Link to comment
Share on other sites

That is the whole script. It's a fragment script on a topic info in a scene. Below is all of it as viewed in external editor.

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
Scriptname Fragments:TopicInfos:TIF_CompJennyIntro_010185CE Extends TopicInfo Hidden Const

;BEGIN FRAGMENT Fragment_Begin
Function Fragment_Begin(ObjectReference akSpeakerRef)
Actor akSpeaker = akSpeakerRef as Actor
;BEGIN CODE
Actor Jenny = Alias_Jenny.GetActorRef()
Jenny.PlayIdle(_3rdPUseStimpakOnSelfOnGround)
;Debug.SendAnimationEvent(Jenny, "3rdPUseStimpakOnSelfOnGround")
Jenny.AddKeyword(CompJennysRevengeKW)
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

Keyword Property CompJennysRevengeKW Auto Const
ReferenceAlias Property Alias_Jenny Auto Const
Idle Property _3rdPUseStimpakOnSelfOnGround Auto Const

 

Link to comment
Share on other sites

I have now and it is running. I was sure it was running because several infos and scenes depend on the keyword this script adds. Jenny is sitting in a NPCWoundedSit furniture. I think I will try adding a script to the NPCWoundedSit and see if I can get the anim. to play in an OnExitFurniture Event.

 

I have also tried using PlaySubGraphAnimation with no joy. I tried moving the animation code to the quest script and calling it via kmyQuest, still no joy.

 

Fantafaust: just want you to know that I really appreciate you trying to help me with this. It's been a thorn in my side for over six months now, I keep coming back to it but nothing I do works.

Link to comment
Share on other sites

Hmm. Well an If statement can run idles, can you throw in:

If Jenny.PlayIdle(_3rdPUseStimpakOnSelfOnGround)
Debug.Notification("Playing Idle")
Jenny.AddKeyword(CompJennysRevengeKW)
Else
Debug.Notification("Failed to play Idle!")
EndIf

And no problem, I like to help.

Edited by Fantafaust
Link to comment
Share on other sites

I have now tried an OnExitFurniture event on the WoundedSit (ref) Jenny is using. Still no joy.

Scriptname CJWoundedSitStimpak extends ObjectReference Const

ReferenceAlias Property Alias_Jenny Auto Const ;checked, double checked, triple checked. It is filled.
Idle Property _3rdPUseStimpakOnSelfOnGround Auto Const

Event OnExitFurniture(ObjectReference akActionRef)
	If akActionRef == Alias_Jenny.GetActorRef()
		Debug.Notification( "Actor " + akActionRef + " exited furniture.")
		If Alias_Jenny.GetActorRef().PlayIdle(_3rdPUseStimpakOnSelfOnGround)
			Debug.Notification("Playing Idle")
		Else
			Debug.Notification("Failed to play Idle!")
		EndIf	
	EndIF
EndEvent

I then tried the following: No success here either.

Scriptname CJWoundedSitStimpak extends ObjectReference Const

ReferenceAlias Property Alias_Jenny Auto Const ;checked, double checked, triple checked. It is filled.
Idle Property _3rdPUseStimpakOnSelfOnGround Auto Const

Event OnExitFurniture(ObjectReference akActionRef)
	If akActionRef == Alias_Jenny.GetActorRef()
		Debug.Notification( "Actor " + akActionRef + " exited furniture.")
		Alias_Jenny.GetActorRef().PlaySubGraphAnimation("3rdPUseStimpakOnSelfOnGround")
		EndIf	
	EndIF
EndEvent

There is bound to be some way to get this animation to play!

 

Link to comment
Share on other sites

Have you tried to play the _3rdPUseStimpakOnSelfOnGround animation on either the actor in question (or else the player character) in game via the console? In my experience that's a good way to ensure the animation is actually a valid idle in the first place. To do this just open the console, click on the actor you want to play the animation, and type

 

playidle _3rdPUseStimpakOnSelfOnGround

 

It's been awhile, but I think that's the right syntax. Hope that helps!

Link to comment
Share on other sites

No I haven't but I'll give it a try now. Just to be clear, the actual name of the animation is 3rdPUseStimpakOnSelfOnGround
I had to put the underscore in front of the property name because the CK will not allow a property name to start with a number.
I did fill the property with 3rdPUseStimpakOnSelfOnGround
Thanks for the input.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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