Dude, I'm not trying to get into the negative range. Subtracting -3 from 5 should yield positive 8.
Further evidence that death counts are unsigned.
Trigger("Player 1"){
Conditions:
Always();
Actions:
Set Deaths("Current Player", "Goliath Turret", Set To, -3);
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Deaths("Current Player", "Goliath Turret", At most, 0);
Actions:
Display Text Message(Always Display, "Deaths <= 0");
}
//-----------------------------------------------------------------//
Trigger("Player 1"){
Conditions:
Deaths("Current Player", "Goliath Turret", At least, 1);
Actions:
Display Text Message(Always Display, "Deaths >= 1");
}
"Deaths >= 1" prints
None of this makes sense if death counts are signed.
However if starcraft actually sees -3 as positive 4294967293, then all of these results make sense.
Now if you say:
Trigger("Player 1"){
Conditions:
Always();
Actions:
Set Deaths("Current Player", "Goliath Turret", Set To, -3);
Set Deaths("Current Player", "Goliath Turret", Add, -3);
}
The result is 4294967290, a number classic trigedit believes to be -3. Why?
Because what classic trigedit swears is -3, is actually 4294967293.
4294967293 + 4294967293 = 8589934586
Written in hex this is: 0x1FFFFFFFA
The overflow bit (the 1 at the beginning) gets ignored. This leaves us with: 0xFFFFFFFA = 4294967290
Post has been edited 3 time(s), last time on Nov 15 2009, 11:09 pm by scwizard.
None.