ChangeFontScaleOverTime()
Set a hud element to transition in fontScale over time. Normally setting the fontScale of an element causes an immediate visual change. However, if the fontScale gets set within <time> after calling ChangeFontScaleOverTime, then the hud element will transition to the new fontScale over the remaining <time>.
Signature
<hud_element> ChangeFontScaleOverTime(<time>)
Called on an entity: hud_element ChangeFontScaleOverTime(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| time | Required | The time to scale the element font in seconds |
Example (from Treyarch's docs)
level.introstring1 ChangeFontScaleOverTime( 1.2 ); level.introstring1.fontScale = 0.3; // This will transition the fontScale from whatever it was before to the new value of 0.3 over 1.2 seconds.
Real uses in BO3's scripts
Called 8 times in the decompiled scripts. A few, zombies first:
- scripts/shared/gameskill_shared.gsc, line 1027
self changefontscaleovertime(timer); - scripts/shared/hud_shared.gsc, line 157
self changefontscaleovertime(self.inframes * 0.05); - scripts/mp/gametypes/_prop_controls.gsc, line 1331
self.lockpropkey changefontscaleovertime(0.1); - scripts/mp/gametypes/prop.gsc, line 3747
hud changefontscaleovertime(movetime); - scripts/mp/gametypes/sas.gsc, line 403
var_a40af05c changefontscaleovertime(0.2);
Related built-ins
- ScaleOverTime()Set a hud element to scale over time.
- FadeOverTime()Set a hud element to transition in color (or alpha) over time.
- MoveOverTime()Set a hud element to move over time.
- GetNextFindBestCoverTime()Generates a new next find cover time
- matchRecordOvertimeRound()Call after matchRecordRoundStart to mark the round as an overtime round (only first overtimee round is actually recorded)
- GetHealthOverlayTime()Returns the time the health overlay has been on
- SoundTimeScale()Set the sound time scale
- SetTimer()Set a timer HUD element to count down
- SetTenthsTimer()Set a timer HUD element to count down in tenths of a second
- SetTenthsTimerUp()Set a timer HUD element to count up in tenths of a second
- SetTimerUp()Set a timer HUD element to count up
- GetTime()Gets the level time in Milliseconds from the start of the level.
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).