I have very simple and nothing special Common Event that displays Variable #4 using Yanfly's GAB window Plugin. This is nothing special for now, but the problem starts here:
I wrote simple function that renders my variable #4 to desired format (Ignore variable #20, with that it's OK):
The problem is when I call this function with Script Command like that - it only show last hint.
But when I set variable #4 with RMMV editor like that then everything is OK.
I could just ignore it and set hints with common events, but I'm planning (I have to) make a multilang option and custom, external functions would help me much. I have already made speech lines loaded from txt file and only hints left to fix.
At first I thought the problem might be with incompability with HIME's Common Event Queue Plugin but when I switched it off, my function DisplayHint() did not start common event #12 (ShowGameHints)
In case of your curiosity: Hint type 7 are speech lines of heroes in those section when they need to be in constant movement so I couldn't just simply use "Show Text" (There is a quest where a team needs to runaway from avalanche and I'm throwing classic one-liners like in action movies from '90s) event to NOT stop events processing.
PS: I provided links to Screenshots so drive your mouse cursor along text so you can find it (if you are using bright style)
PS #2 : I modified slighty GAB plugin so actor faces are loaded from variable 20 and that values are stored in text file. So that's why I told to ignore that variable.
I wrote simple function that renders my variable #4 to desired format (Ignore variable #20, with that it's OK):
Code:
HintKind = function(type, x){
switch (type)
{
case 1 :
{
$gameVariables.setValue(20, 0);
return '<center>\\i[87]\\hc[32cd32]Hint:\\hc[ffffff]';
}
case 2 :
{
$gameVariables.setValue(20, 0);
return '<center>\\i[210]\\hc[87ceeb]New Item:\\hc[ffffff]';
}
case 3 :
{
$gameVariables.setValue(20, 0);
return '<center>\\i[191]\\hc[ffcc00]New Quest:\\hc[ffffff]';
}
case 4 :
{
$gameVariables.setValue(20, 0);
return '<center>\\i[90]\\hc[ffcc00]Quest Updated:\\hc[ffffff]';
}
case 5 :
{
$gameVariables.setValue(20, 0);
return '<center>\\i[90]\\hc[ffcc00]Quest Completed:\\hc[ffffff]';
}
case 6 :
{
$gameVariables.setValue(20, 0);
return '<center>\\i[17]\\hc[ff5757]Warning:\\hc[ffffff]';
}
case 7 :
{
var p = ReadFile('./data/speech/hints.txt');
var r = Explode(p, "\n");
var s = Explode(r[x], "|");
$gameVariables.setValue(20, Number(s[1]));
return '\\c[6]' + s[0] + ':\\hc[ffffff] ' + s[2];
}
case 8 :
{
$gameVariables.setValue(20, 0);
return '<center>\\i[252]\\hc[c885ff]Skill Power increased:\\hc[ffffff]';
}
case 9 :
{
$gameVariables.setValue(20, 0);
return '<center>\\i[82]\\hc[98ff98]New Team Member:\\hc[ffffff]';
}
case 10 :
{
$gameVariables.setValue(20, 0);
return '<center>\\i[15]\\hc[ff813d]Critical Damage!!\\hc[ffffff]';
}
case 11 :
{
$gameVariables.setValue(20, 0);
return '<center>\\i[312]\\hc[e3bb19]Level Up!\\hc[ffffff]';
}
}
}
DisplayHint = function(type, hint){
var a = HintKind(type, hint);
if (type == 7)
{
$gameVariables.setValue(4, a);
}
else
{
$gameVariables.setValue(4, a + " " + hint + "</center>");
}
$gameTemp.reserveCommonEvent(12);
$gameTemp.clearCommonEvent(12);
}
But when I set variable #4 with RMMV editor like that then everything is OK.
I could just ignore it and set hints with common events, but I'm planning (I have to) make a multilang option and custom, external functions would help me much. I have already made speech lines loaded from txt file and only hints left to fix.
At first I thought the problem might be with incompability with HIME's Common Event Queue Plugin but when I switched it off, my function DisplayHint() did not start common event #12 (ShowGameHints)
In case of your curiosity: Hint type 7 are speech lines of heroes in those section when they need to be in constant movement so I couldn't just simply use "Show Text" (There is a quest where a team needs to runaway from avalanche and I'm throwing classic one-liners like in action movies from '90s) event to NOT stop events processing.
PS: I provided links to Screenshots so drive your mouse cursor along text so you can find it (if you are using bright style)
PS #2 : I modified slighty GAB plugin so actor faces are loaded from variable 20 and that values are stored in text file. So that's why I told to ignore that variable.