Editing
WeaponCtrOp
From Eternity Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{codepointer|description= Sets the value of the indicated counter variable for the weapon using two (possibly the same) counters as operands.|usage= '''WeaponCtrOp'''(''c_oper1_num'', ''c_oper2_num'', ''c_dest_num'', ''specialop'')|parameters= *''c_oper1_num'': counter operand #1 (0 to 2) *''c_oper2_num'': counter operand #2 (0 to 2) *''c_dest_num'': counter destination (0 to 2) *''specialop'': operation to perform. One of the following (consider c1, c2 and cdest the contents of the three counters): **'''add''' or 1 **'''sub''' or 2 **'''mul''' or 3 **'''div''' or 4: integer division. Only operates if c2 <> 0 **'''mod''' or 5: modulus operation (remainder of integer division). Only operates if c2 > 0 **'''and''' or 6: bitwise "and" (only common bits) **'''or''' or 8: bitwise "or" (any true bits) **'''xor''' or 9: bitwise "xor" (bit-by-bit added modulo-2) **'''hitdice''' or 12: "damage" calculation (cdest = c1*random(1, c2)). Only operates if c2 > 0. **'''rshift''' or 13: divide c1 by 2^c2 **'''lshift''' or 14: multiply c1 by 2^c2 **'''abs''' or 15: cdest = absolute of c1. Unary. **'''negate''' or 16: cdest = -c1. Unary. **'''not''' or 17: cdest becomes 1 if c1 is null. Otherwise it becomes 0. Unary. **'''invert''' or 18: cdest becomes one's complement of c1. Unary.|notes= Each weapon has 3 counters. Counter values cannot be transferred between weapons.|seealso= *[[List_of_codepointers#Frame_scripting|Weapon frame scripting codepointers]]}}
Summary:
Please note that all contributions to Eternity Wiki are considered to be released under the GNU Free Documentation License 1.2 (see
Eternity Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Codepointer
(
edit
)
Navigation menu
Page actions
Page
Discussion
Read
Edit
History
Page actions
Page
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information