It would be nice if you added comments for every line, it gets confusing when you have to figure out which action each line of triggers is doing, (just giving to a player? affecting address through table 1, 2? by giving or removing?)
7.1
Two Switchers: UnitID 2635 owned by Player 12 at arbitrary indexes
One Bumper: UnitID 2547 owned by Player 12 at index 1648
One Target: Any UnitID owned by Any Player at Index 1628
Initialize:
Give Units to Player("Player 12", "Player 3", 2547, 1, "Anywhere"); \\ this is just to get the bumper in position? (p3 bumper), why not just start out with the bumper owned by p3?
Loop format:
Give Units to Player("Player 12", "Player 1", 2635, 2, "Anywhere"); \\ +2 to player id for the bumper (p5 bumper)
Give Units to Player("Player 5", "Player 7", 2547, 1, "Anywhere"); \\ bump target unit id (p7 bumper)
Give Units to Player("Player 1", "Player 12", 2635, 2, "Anywhere"); \\ -2 to player id for the bumper (p5 bumper)
Give Units to Player("Player 5", "Player 3", 2547, 1, "Anywhere"); \\ move bumper into position to repeat loop (p3 bumper)
(Repeat this to increase by multiple)
Trigger Cycle End:
Give Units to Player("Player 3", "Player 12", 2547, 1, "Anywhere"); (The Switchers will no longer work when the trigger cycle ends)
\\ (p12 bumper) why don't the switchers work anymore? couldn't we just repeat the initialize step to start doing loops again? whats the point of this step, couldn't we just have a death counter that tells the loop to repeat x times and to then stop?
I guess this last step is undoing the memory alteration caused by the initialize step?
7.2
A Protoss carrier is owned by Player 5, it is located at index 1627 and has 1 interceptor in hanger (so the interceptor is at index 1628).
Triggers to decrease target value by 1:
Give Units to Player("Player 3", "Player 1", 2547, 1, "Anywhere"); \\ move bumper (p1 bumper), what else does this do?
Give Units to Player("Player 12", "Player 1", 2635, 2, "Anywhere"); \\ +2 to bumper player (p3 bumper)
Give Units to Player("Player 3", "Player 5", 2547, 1, "Anywhere"); \\ move bumper (p5 bumper), what else does this do?
Give Units to Player("Player 1", "Player 12", 2635, 2, "Anywhere"); \\ -2 to bumper player (p3 bumper)
Give Units to Player("Player 5", "Player 7", "Protoss Carrier", 1, "Anywhere"); // Get carrier player to match interceptor player (p7 carrier)
Give Units to Player("Player 7", "Player 5", "Protoss Carrier", 1, "Anywhere"); // Decrease target given by give formula with player 7 by 1, is this via table 1 or 2?
(Repeat to decrease by more)
what happens when u give an interceptor to a different player then the carrier?
7.3
Addon address (modified) = Value at: (owning building’s address) + 128 \\\\ this is where the address of the addon of the current unit is stored? so if we change the value at (owning building’s address) + 128 we can can specify any unit we want to be it's addon?
Addon’s CSprite address = (Addon address) + 12
Addon’s UnitID address = (Addon address) + 100
Addon’s Player address = (Addon address) + 76
Setting Target Byte by Giving:
Addon’s CSprite Value = (Target Address) – 10
Give to Player 1 + (Target Value-1)
Target Address + 4, 4th bit must NOT be set \\\\ we must make sure that 0x4 is not set or is it 0x7? (does not set mean =0?)
Target Address +18 (4 bytes) must be zero \\\\ make sure 0x12, 0x13, 0x14, 0x15 are 0?
By Giving:
Address incremented = 48*(Addon’s UnitID Value) + 4*(New Owner) + 5776160
Address decremented = 48*(Addon’s UnitID Value) + 4*(Addon’s Player Value) + 5776160 \\\\ addons player value = old owner?
Address incremented = 48*(Addon’s UnitID Value) + 4*(New Owner) + 5787104
Address decremented = 48*(Addon’s UnitID Value) + 4*(Addon’s Player Value) + 5787104
- Incremented/Decremented means +1/-1
the set up seems to be
Given:
Target Address satisfying: Target Address + 4, 4th bit must NOT be set, Target Address +18 (4 bytes) must be zero
Unit at address X (playing add-on role) with Address X+12 = target value - 10
Unit at address Y (playing ‘being added on to’ roll)
step 1) set Address Y + 128 to X
step 2) give the Address Y unit to 1+(Target Value - 1)
I'm not seeing what we're accomplishing with 7.2 or 7.3
Post has been edited 3 time(s), last time on Oct 4 2014, 11:54 pm by sigsaucy.