seularts Posted February 2, 2012 Share Posted February 2, 2012 (edited) Is there a way to inset a script function, such as: Player.GetItemCount Caps001 into an NPC spoken dialog!? I couldn't find the answer to this question anywhere. Thanks! Edited February 2, 2012 by seularts Link to comment Share on other sites More sharing options...
viennacalling Posted February 2, 2012 Share Posted February 2, 2012 I am fairly certain you cannot do that with NPC dialog. The only thing I have seen that can do something like that is messages, and messages require variables and not direct functions. Link to comment Share on other sites More sharing options...
SHazardous Posted February 4, 2012 Share Posted February 4, 2012 Im not sure about this... But I think there was something like that done in a geck tutorial site.. Guest/dialog tutorial where little girl gave a reward to player during or at the end of dialogue. Link to comment Share on other sites More sharing options...
Gribbleshnibit8 Posted February 8, 2012 Share Posted February 8, 2012 You cannot have a variable in dialog per-say in that the subtitles would show the variable value, or the player option would be "X Number of Caps". The reason is that all dialog is recorded voice files that have to be done beforehand, and then synced with .lip files to move the mouth. Obviously altering the number would require every possible variation to be recorded, and the game would need some way to determine what number is being used and what file to play. At that point, it's easier to just make a group of predetermined dialog, and have different options for each one. There is however, a beginning and ending script for every dialog topic. Scripts can do all kinds of things (check out CRAFT for more on that), and you could go so far as to open a message box from the dialog option of an NPC saying something like "You'll need to give me some caps before I'll consider that", then have the ending script calculate the actual cap count, and display a message box that shows the amount and gives an option for yes/no. This might end the dialog sequence with the NPC though, so not sure how it would affect things. tl;dr No, variables cannot be used in dialog, but you can use vague wording and then scripts to handle the variable. Link to comment Share on other sites More sharing options...
Recommended Posts