Jump to content

Scripting help needed


LegacyCloud

Recommended Posts

I'm hoping someone here knows what will undoubtedly be the simple answer to this seemingly simple requirement;

 

What I want to do is utilize the 'playandwait' function in the begin fragment of a dialogue so that a sound file will play (from the player) before the NPC delivers their audio.

 

From what I can tell, this should sit something like:

 

sound property lcsvendor01 auto

lcsvendor01.playandwait(game.getplayer())

 

However when I try to add this to the begin fragment of the dialogue and compile, it hits me with the old 'no viable alternative at input...' bit, but however I try wrapping it in it's own function or event block is just throws up even more errors about expected endfunction's etc...

 

So any words of wisdom would be greatly appreciated before I go bald through pulling my hair out!

Link to comment
Share on other sites

Full error message as below:

Starting 1 compile threads for 1 files...
Compiling "TIF__0007F6BC"...
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0007F6BC.psc(9,0): no viable alternative at input 'sound'
C:\Program Files (x86)\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\TIF__0007F6BC.psc(9,15): no viable alternative at input 'lcsvendor01'
No output generated for TIF__0007F6BC, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on TIF__0007F6BC

this is after doing as Ghaunadaur suggested, though I'm not certain I fully understand what the intention was with that instruction. I typed ; (comment) then closed the window, reopened and put in the code but there was no discernible difference in anything :/

Link to comment
Share on other sites

Sorry if I wasn't clear, my bad. I meant to type a semicolon, which indicates a comment in papyrus. This is just to compile the script.

In a fragment, you need to add a property by using the 'properties' button, not in the code box itself. The code box should only contain the function.

lcsvendor01.playandwait(game.getplayer())
Edited by Ghaunadaur
Link to comment
Share on other sites

Yeah I think you're right, just banging my head against the wall reverting the script to remove the erronous property in order to verify that was it.

 

Edit: Seems to have been the case, it now compiles without error. However, after compiling I close the window and when I reopen to check again it's as though no code has been added. This reflects in the source as well where the last line it saves is the new property.

 

The begin fragment always loads by default with the following comment in place, not sure if this is the cause or not:

 

;WARNING: Unable to load fragment source from function Fragment_1 in script TIF__0007F6BC
;Source NOT loaded
Edited by LegacyCloud
Link to comment
Share on other sites

  • Recently Browsing   0 members

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