
When you give a command center with a comsat station to a different player the player field of CSprite is written to, which is a 1-byte set.
Use 1: You can now set any byte starcraft has write access to, to a value 0-10 (ie: you can read 4-byte values with 1024 triggers, you can change a 4-byte value by millions in an instant)
To do so set deaths of player 4's marine to your targetAddress-10
Then give the command center to the player+1 you want to set the targetAddress to
Restrictions (note: you could work backwards from zero'd values):
targetAddress+4 bit4 (whether the sprite is selected) must NOT be set
targetAddress+18 (4 bytes) must be zero
Use 2: You can now add or subtract 1 very easily from any 4-byte value starcraft has write access to by setting the unitID and player fields embedded in the death table (you could create hundreds of EUP units with minimal hassle).
To do so set deaths of player 2's vulture to floor((targetAddress-5776160)/48)
Then give the command center to player ((targetAddress-5776160)%48)/4 (adds) 1-based player
Or give the command center away from player ((targetAddress-5776160)%48)/4 (subtracts) 1-based player
To do this continuously, reset deaths of p2's vulture before changing back player
Use 3: You can decrease a value to any amount easily by setting one or more bytes to 0, subtracting 1 from the 4-byte amount, and repeating
Example map: this map takes 1-5 seconds to load, it will appear frozen for that time, after that, the last trigger for p1 will give the command center from p1 to p2, which due to how p4's marine deaths are set, will increase the targeted byte by one (in this case the second byte of minerals increases by 1, adding 65536 minerals).
Download
Cheers!
Post has been edited 10 time(s), last time on Aug 25 2015, 2:46 am by jjf28.
TheNitesWhoSay - Clan Aura - github
Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.
Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.