1.0
04 Nov 2021 18:47
class HelpString {
int HelpID = -1;
int Timer = -200;
}
array<HelpString> HelpStrings(jjLocalPlayerCount);
bool onDrawAmmo(jjPLAYER@ player, jjCANVAS@ canvas) {
HelpString@ helpString = HelpStrings[player.localPlayerID];
const uint xTile = uint(player.xPos) / 32, yTile = uint(player.yPos) / 32;
if (jjEventGet(xTile,yTile) == AREA::TEXT && jjParameterGet(xTile,yTile, 8,10) == 0) {
const int helpID = jjParameterGet(xTile,yTile, 0,8);
if (helpID >= 100 && helpID <= 115) {
if (helpID - 100 != helpString.HelpID) {
helpString.Timer = jjGameTicks + 70;
helpString.HelpID = helpID - 100;
} else if (helpString.Timer < jjGameTicks) {
helpString.Timer = jjGameTicks;
}
}
}
const int time = helpString.Timer - jjGameTicks;
if (time > -70) {
canvas.drawString(
0x8000 + time * int(abs(time)) / 10,
10,
jjHelpStrings[helpString.HelpID],
STRING::SMALL,
STRING::SPIN,
uint(abs(time)) * 3
);
} else
helpString.HelpID = -1;
return false;
}
Jazz2Online © 1999-INFINITY (Site Credits). We have a Privacy Policy. Jazz Jackrabbit, Jazz Jackrabbit 2, Jazz Jackrabbit Advance and all related trademarks and media are ™ and © Epic Games. Lori Jackrabbit is © Dean Dodrill. J2O development powered by Loops of Fury and Chemical Beats.
Eat your lima beans, Johnny.