Kain82 Posted April 13, 2014 Posted April 13, 2014 I am having a problem compiling a script in the ck. Each time I try to compile it, it always fails. In the error message it says the following: Starting 1 compile threads for 1 files...Compiling "TIF__010012E7"...D:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__010012E7.psc(9,25): variable TestDummyM is undefinedNo output generated for TIF__010012E7, compilation failed.Batch compile of 1 files finished. 0 succeeded, 1 failed.Failed on TIF__010012E7 As you can see, it says my npc 'TestDummyM' is undefined. My question is: How do I define him?
Kain82 Posted April 13, 2014 Author Posted April 13, 2014 Thank you for the reply. But no, I don't know to do that.
Veladarius Posted April 13, 2014 Posted April 13, 2014 Actor Property TestDummyM Auto This will tell papyrus that for this script you have an actor called TestDummyM that you will be using. Everything that is in the CK whether it is an actor, object, place or anything else has to be defined as a property in a script. This can be added yourself or by using the Properties button and Actor is the Type and TestDummyM is the name of it. Once added, use the Properties button, select the property and tell it what that item actually is. You can find more info here: http://www.creationkit.com/Bethesda_Tutorial_Papyrus_Introduction_to_Properties_and_Functions
Kain82 Posted April 14, 2014 Author Posted April 14, 2014 First of all I wanted to say thanks for helping me. Second, I was able to compile the script. But how do I select the property and tell it what it is?
Veladarius Posted April 14, 2014 Posted April 14, 2014 Go to the scripts tab and double click on the script, it will bring up the properties menu. Select the items in the left side and there will be a drop down menu on the right. For actors you have to select the cell they have been placed in then the actor itself so you will have to place them somewhere in the world. http://www.creationkit.com/File:Edit_Property_Value_example.jpg
Kain82 Posted April 15, 2014 Author Posted April 15, 2014 Thanks for the help I did what you said and it worked. I have one more question, how do I make the script fire when I want it too? For example: I want the script to fire after a conversation ends. Also here's the script I made it compiled, but want to know if I did it right for what I want it to do. Which is to make an npc play an animation after a conversation. Scriptname PlayAnimation extends Quest {Npc plays animation after dialogue.} Actor Property TestDummyM auto Event OnActivate () Debug.SendAnimationEvent(TestDummyM, "bookopen") endEvent Should I have made the extends actor? Or leave it as is?
Veladarius Posted April 15, 2014 Posted April 15, 2014 The easiest place to add the script would be in the dialogue. You won't need the onactivate event to play the idle, all you need to add is the sendanimationevent in the fragment and the property. The fragment will add the proper header to the script.
Kain82 Posted April 15, 2014 Author Posted April 15, 2014 Ok, I will try that when I get home later. Thank you for your help.
Kain82 Posted April 18, 2014 Author Posted April 18, 2014 Ok, I did everything as you said, but when I try to compile the script fragment I get "TestDummyM is undefined" error. Can you tell me if I added the property in the script correctly? Scriptname TestDummyMProperty extends Quest {Adds TestDunnyM as a property.} Actor Property TestDunnyM Auto Then I entered the following in the end scipt fragment window: Debug.SendAnimationEvent(TestDummyM, "bookopen")
Veladarius Posted April 18, 2014 Posted April 18, 2014 Ok, I did everything as you said, but when I try to compile the script fragment I get "TestDummyM is undefined" error. Can you tell me if I added the property in the script correctly? Scriptname TestDummyMProperty extends Quest {Adds TestDunnyM as a property.} Actor Property TestDunnyM Auto Then I entered the following in the end scipt fragment window: Debug.SendAnimationEvent(TestDummyM, "bookopen") Did you add the property to the fragment in the dialogue? The script fragments in dialogue are complete self contained scripts and not part of the script where fragments from the quest stages are.
Kain82 Posted April 18, 2014 Author Posted April 18, 2014 Once again thank you for your response as for your question. No I did not add the property to the fragment in dialogue. So just to be sure. I have to add the following to the end script fragment? Actor Property TestDummyM Auto Debug.SendAnimationEvent(TestDummyM, "bookopen")
Veladarius Posted April 18, 2014 Posted April 18, 2014 Once again thank you for your response as for your question. No I did not add the property to the fragment in dialogue. So just to be sure. I have to add the following to the end script fragment? Actor Property TestDummyM Auto Debug.SendAnimationEvent(TestDummyM, "bookopen") Put this line if the script fragment box: Debug.SendAnimationEvent(TestDummyM, "bookopen") Then compile the script (and get the error). Click on the properties button by the script name and add the property there or right click on the script name and select 'Edit Source' which will bring up the editor. You will see something like this: ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 1 Scriptname CDxCA04plug4 Extends TopicInfo Hidden ;BEGIN FRAGMENT Fragment_0 Function Fragment_0(ObjectReference akSpeakerRef) Actor akSpeaker = akSpeakerRef as Actor ;BEGIN CODE plug.setvalueint(4) <------- This line is the only line in the Script Fragment Window ;END CODE EndFunction ;END FRAGMENT ;END FRAGMENT CODE - Do not edit anything between this and the begin comment GlobalVariable Property Plug Auto You can put your property at the beginning or the end of the script. You can select Build which will compile it so you can see if it works or just Save it which will compile it then save it, either way you will still have to save it at the end. Once the property is defined you can click on the properties button and point the property to your actor.
Kain82 Posted April 18, 2014 Author Posted April 18, 2014 Thank you, the script fragment compiled without any issues.
Kain82 Posted April 19, 2014 Author Posted April 19, 2014 Everything works fine except when it's time for the animation to play the NPC goes rigid - with arms straight out at the sides - rather then playing the animation. I tried running FNIS but the problem persists.Do you know why this is happening or what I could possibly do to fix it?
Veladarius Posted April 19, 2014 Posted April 19, 2014 The name of the animation probably isn't correct. Some of the idle's for reading books are: IdleBook_Reading or IdleBook_Read or IdleBook_TurnOnePage or IdleBook_OnePage or IdleBook_TurnManyPages Try one of those and see if they work.
Heromaster Posted April 19, 2014 Posted April 19, 2014 This might be a problem because you use the Debug.SendAnimationEvent. Do not use it unless you know exactly what you are doing. You want to use an idle animation so use the function for it: Actor.PlayIdle.
Kain82 Posted April 19, 2014 Author Posted April 19, 2014 The name of the animation probably isn't correct. Some of the idle's for reading books are: IdleBook_Reading or IdleBook_Read or IdleBook_TurnOnePage or IdleBook_OnePage or IdleBook_TurnManyPages Try one of those and see if they work. Thank you once again, I will try this. This might be a problem because you use the Debug.SendAnimationEvent. Do not use it unless you know exactly what you are doing. You want to use an idle animation so use the function for it: Actor.PlayIdle. Thank you for your reply. But can you give me an example of the syntax for Actor.Playidle?
Heromaster Posted April 19, 2014 Posted April 19, 2014 Make a property of the idle you want to use and then just play the idle. Bool Success Success = MyActor.PlayIdle(MyIdle)
eriberri Posted April 19, 2014 Posted April 19, 2014 The name of the animation probably isn't correct. Some of the idle's for reading books are: IdleBook_Reading or IdleBook_Read or IdleBook_TurnOnePage or IdleBook_OnePage or IdleBook_TurnManyPages Try one of those and see if they work. Veldarius, I don't know if this is 'valid' or not, but I thought it worth mentioning that the animation is not a vanilla one - it's a new animation created by someone helping us. It works perfectly in the previews he showed us, but that's outside of Skyrim/Creation Kit (3Ds Max?). This is why Kain is making this test cell, so the person making the animations can test them in Skyrim and adjust them to look (and fit) right.
Veladarius Posted April 19, 2014 Posted April 19, 2014 You will probably have to look at FNIS to see how to get the animation into Skyrim or replace a stock animation with yours. Animations are one of those things that I don't think can be made in the CK. When we were doing some testing on the armbinder animations for DD - Integration we replaced some other animations with them until we could get them set up in FNIS.
Heromaster Posted April 19, 2014 Posted April 19, 2014 You need to run FNIS for modders and then FNIS for users. Read the instructions how to use FNIS for modders to do this. The name of the anim file needs to match with the animation name you create in the creation kit under gameplay --> animations.
Kain82 Posted April 24, 2014 Author Posted April 24, 2014 So I put the following script into script fragment box: Bool Success Success = TestDummyM.PlayIdle(bookopen) But when I press the compile button, I get the following error: Starting 1 compile threads for 1 files... Compiling "TIF__02000D8D"... C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02000D8D.psc(10,30): variable bookopen is undefined No output generated for TIF__02000D8D, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on TIF__02000D8D I also tried these scripts which I found at http://www.creationk...om/Actor_Script Bool PlayIdle(Idle akIdle) = Plays the passed idle on this actor. Bool PlayIdleWithTarget(Idle akIdle, ObjectReference akTarget) = Plays the passed idle on this actor, overriding the actor's current target with the one given. Which turned out like this: Bool PlayIdle(Idle bookopen) Starting 1 compile threads for 1 files... Compiling "TIF__02000D8D"... C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02000D8D.psc(9,13): required (...)+ loop did not match anything at input '(' C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02000D8D.psc(9,14): no viable alternative at input 'Idle' C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02000D8D.psc(9,27): required (...)+ loop did not match anything at input ')' No output generated for TIF__02000D8D, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on TIF__02000D8D and this: Bool PlayIdleWithTarget(Idle bookopen, ObjectReference TestDummyM) Starting 1 compile threads for 1 files... Compiling "TIF__02000D8D"... C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02000D8D.psc(9,23): required (...)+ loop did not match anything at input '(' C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02000D8D.psc(9,24): no viable alternative at input 'Idle' C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02000D8D.psc(9,37): required (...)+ loop did not match anything at input ',' C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02000D8D.psc(9,65): required (...)+ loop did not match anything at input ')' No output generated for TIF__02000D8D, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on TIF__02000D8D
Kain82 Posted April 26, 2014 Author Posted April 26, 2014 I also tried adding the Idle Property to fix the previous 'variable bookopen is undefined' error - this is what I got: Idle Property bookopen Auto Bool Success Success = TestDummyM.PlayIdle(bookopen) Quote Starting 1 compile threads for 1 files... Compiling "TIF__02000D8D"... C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02000D8D.psc(9,0): no viable alternative at input 'Idle' C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02000D8D.psc(9,14): no viable alternative at input 'bookopen' C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__02000D8D.psc(11,8): no viable alternative at input '=' No output generated for TIF__02000D8D, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on TIF__02000D8D As always, any help is appreciated. I'm not really sure what to do at this point..
Recommended Posts
Archived
This topic is now archived and is closed to further replies.