SetCounter

From Eternity Wiki
Revision as of 17:39, 1 February 2010 by Printz (talk | contribs) (→‎See also)
Jump to navigationJump to search

SetCounter (ctr, value, operation)

  • ctr: counter number, from 0 to 7.
  • value: value to set, in the signed long integer range
  • operation:
assign or 0: ctr = value
add or 1: ctr += value
sub or 2: ctr -= value
mul or 3: ctr *= value
div or 4: ctr /= value
mod or 5: ctr %= value
and or 6: ctr &= value
andnot or 7: ctr &= ~value
or or 8: ctr |= value
xor or 9: ctr ^= value
rand or 10: ctr = rand()
randmod or 11: ctr = rand()%value
rshift or 13: ctr >>= value
lshift or 14: ctr <<= value

Sets a value to a variable for an actor, allowing dynamic behavior. Values can be merely assigned or operated on.

See also