Currently, those parameters use different representation inside and outside of trigger:
SetDeaths(P1, Add, 1, "Terran Marine");
// Currently $Add = 8 while trigger requires 8 << 24 (converted in build time)
function foo(modifier: TrgModifier) {
SetDeaths(P1, modifier, 1, "Terran Marine");
}
// Currently these calculate << 24 during game
foo(Add);
foo(8);
var m = $Add;
foo(m);
var n = 8;
foo(n);
To remove in-game conversion and assign directly into trigger, we need to unify and match value representation.
Change
Motivation
Currently, those parameters use different representation inside and outside of trigger:
To remove in-game conversion and assign directly into trigger, we need to unify and match value representation.
Affected condition parameters
u8 << 16: Numeric comparison, switch state u8 << 24: Condition byte
Affected action parameters
u8 << 16: Action byte u8 << 24: Number of units (0 means All Units), action state, unit order, number modifier