Jump to content

variables in "real" dialogue


spammster

Recommended Posts

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

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

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 messagebox

in 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 work

HPfull.%.0f doesn't work

%.0f HPfull doesn't work

HPfull:%.0f HPfull doesn't work

 

so is anyone able to tell me how to call them correctly ?

Link to comment
Share on other sites

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

  • Recently Browsing   0 members

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