spammster Posted November 1, 2009 Share Posted November 1, 2009 Is it possible to get variables displayed in dialogue ? like if ask the NPC what their current health is, that they can give an answer like: answer: Right now I'm at "npcid.getav health" HP Link to comment Share on other sites More sharing options...
5ivexxxxx Posted November 1, 2009 Share Posted November 1, 2009 I know there's &PCName to display the PC's name. I'm not really sure, but I think some of the message formatting notations could work. Make the beginning script something similar to "set Health to NPCRef.getav health", and have the dialogue be "Right now I'm at %0f health." I'm not entirely sure this would work, however. I know that something similar is used for placing health percentages and whatnot in messages. Link to comment Share on other sites More sharing options...
spammster Posted November 1, 2009 Author Share Posted November 1, 2009 thanks, I'm gonna give that a try and see if it works edit: nope, that didn't work, scripts etc. all compile fine (as expected), however it does not show a value it show: "I'm at %0f HP" Link to comment Share on other sites More sharing options...
5ivexxxxx Posted November 1, 2009 Share Posted November 1, 2009 I believe it's supposed to be %.0f (with the period in between the percent sign and the 0f. Check here for more info on function notation stuff. It should work properly. Link to comment Share on other sites More sharing options...
Pronam Posted November 1, 2009 Share Posted November 1, 2009 Take a look at the oblivion version of that one. That one may be be a bit more elaborated.. The discussion page says it may possible conflict with FOSE.Well, scratch that then, eh :). Link to comment Share on other sites More sharing options...
Cipscis Posted November 2, 2009 Share Posted November 2, 2009 That part of the discussion is simply saying that formatting notation specific to FOSE's format string parameters shouldn't be used with messages. The "%f" format specifier is not specific to FOSE, and should work with ShowMessage and FOSE's format string parameters. As far as I know, dynamic data can't be displayed in dialogue, mainly due to the fact that you can't dynamically generate voice to accompany generated subtitles. The best option for what you're looking for would be to display a message that shows the actor's health via the format specifier that Five_X mentioned. Cipscis Link to comment Share on other sites More sharing options...
spammster Posted November 2, 2009 Author Share Posted November 2, 2009 okay, i can work with that option, that upon the question a messagebox is shown, however a new problem arises, how the hell do i set the variables, since it seems like no matter what i do it doesn't work. if i define the variables in the questscript that calls the messagebox, i either get a warning like: too few variables in messagebox parameters (if i just enter: showmessage zimhealth)or unknown variable (if i enter: showmessage zimhealth, HPfull, Healthpoints) same happens if i declare the variables inside the messageboxin the script its set like this: (no errors reported here) (name of the script: "zimquestscript") ... set HPfull to zimfollow.GetBaseActorValue Health; gets max. available HP set HealthPoints to zimfollow.getav Health; gets current HP ... zimfollow = NPC ID Zim has HPfull = %.0f Healthpoints in total He currently has : Healthpoints = %.0f HP doesn't matter if i add the variables in the messagebox after the line or not (Zim has HPfull = %.0f Healthpoints in total, HPfull) seems like no matter how i do it it doesn't workHPfull.%.0f doesn't work%.0f HPfull doesn't workHPfull:%.0f HPfull doesn't work so is anyone able to tell me how to call them correctly ? Link to comment Share on other sites More sharing options...
c2552 Posted November 2, 2009 Share Posted November 2, 2009 Groovy Followers does this, here's an extract from the according script:scn GroovyFollowerMenuEffectScript1 [...] ref Myself [...] short MyHealth short MyBaseHealth begin ScriptEffectStart set Myself to GetSelf [...] end [...] begin GameMode [...] set MyHealth to GetAV Health set MyBaseHealth to GetBaseAV Health set GFQ1.FollowerCurrentHealthPercentage to GetHealthPercentage * 100 [...] showmessage GroovyFollowerMenu01f1 GFQ1.FollowerCurrentHealthPercentage MyHealth MyBaseHealth [...]GFQ1 is the quest for "Follower 1" Message Text:"Follower 1 is currently following you.Health: %.0f%% (%.0f out of %.0f)" Link to comment Share on other sites More sharing options...
Recommended Posts