In my defense map, there's a group of invincible cannons as the final line of defense. If the remaining enemy wave can survive the walk through these cannons, the game ends.
One problem is once the enemies plow through the first 5 players, the game is completely in the hands of the 6th player to stop the enemy.
I want other players to be able to still get involved at this point and save the game.
I had an idea of trapping an Infested Kerrigan on a 1x1 tile near the end, by the cannons, and allowing one player to "Rent" the Kerrigan using Gas for the remainder of the round. This Kerrigan would have infinite mana for Ensnares and Storms.
To my main question: I preplace the Kerrigan with P10 as the owner. When someone purchases Kerrigan, I give the unit from P10 to Current Player. Then when the round ends I give the Kerrigan from Force 1 back to P10. But at this point, Kerrigan retains the color of the previous player who owned it (although the correct color is displayed on the minimap). I understand this is a well known quirk, but it's actually really bad. If someone sees the Kerrigan with a teammate's color, they won't try to purchase it and every second counts at the end.
Methods tried to far:
- ACTION: Give 1 Kerrigan from P10 to P10 (hoping the color would be transferred)
- There's 15 rounds so 15 possible chances of renting Kerrigan. Preplaced 15 Kerrigan owned by P10 in corner of map with the property of cloaked. Give the Kerrigans infinite mana. When round ends I remove the original Kerrigan, and move a new (cloaked) one as a replacement. Then set the Kerrigan's mana to 0 to remove the cloak. Problem being the Kerrigans start the game UNCLOAKED and I hate how messsy it looks on an otherwise very tidy map.
Any other methods I could try?
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Oh man, sending me down a rabbit hole
None.
After some digging it looks as though I won't be able to use this method, as I'm already using up all 8 player slots. 7 and 8 are both computers. 7 is normal units and 8 is heroes.
None.
With an EUD action, after giving it back to P10, you can set the unit's CSprite Player ID to 9, which will change the player color to Player 10's.
I can't tell you what the address would be since it's on a first-come-first-served basis and I think would depend on a unit's index if preplaced. I think a unit preplaced as index 0 always has a sprite pointer to 0x0063FD04, so you can try moving your infested kerrigan to be index 0 in the units properties, and for your trigger giving it back to P10, add an action to modify memory at 185962; set to 589972 (this value is specific for an infested kerrigan with P10 color).
With an EUD action, after giving it back to P10, you can set the unit's CSprite Player ID to 9, which will change the player color to Player 10's.
I can't tell you what the address would be since it's on a first-come-first-served basis and I think would depend on a unit's index if preplaced. I think a unit preplaced as index 0 always has a sprite pointer to 0x0063FD04, so you can try moving your infested kerrigan to be index 0 in the units properties, and for your trigger giving it back to P10, add an action to modify memory at 185962; set to 589972 (this value is specific for an infested kerrigan with P10 color).
Thanks, I'll give my best attempt and report back here.
None.
With an EUD action, after giving it back to P10, you can set the unit's CSprite Player ID to 9, which will change the player color to Player 10's.
I can't tell you what the address would be since it's on a first-come-first-served basis and I think would depend on a unit's index if preplaced. I think a unit preplaced as index 0 always has a sprite pointer to 0x0063FD04, so you can try moving your infested kerrigan to be index 0 in the units properties, and for your trigger giving it back to P10, add an action to modify memory at 185962; set to 589972 (this value is specific for an infested kerrigan with P10 color).
Thanks, I'll give my best attempt and report back here.
First I moved the P10 Infested Kerrigan to Index 0.
Using the Classic Trigger Editor, when I enter "185962" into there, it automatically changes the address to "0x0063FD0C".
Then when I enter "0x0063FD04" into the address, it changes back to "185960".
Using the text based Trigger Editor, I set the action to:
MemoryAddr(0x0063FD04, Set To, 589972);
Alas, I haven't been able to achieve the color change.
None.
I came up with a pretty good solution which I'm satisfied with for now. I preplaced an arbiter owned by P10 at the far bottom left corner of the map, hidden by the UI. Under the arbiter, I preplaced 15 P10 Kerrigans onto "placeable" null terrain. The only real downside is the arbiter can be seen on the mini map.
None.
I came up with a pretty good solution which I'm satisfied with for now. I preplaced an arbiter owned by P10 at the far bottom left corner of the map, hidden by the UI. Under the arbiter, I preplaced 15 P10 Kerrigans onto "placeable" null terrain. The only real downside is the arbiter can be seen on the mini map.
If there's an easy way to change P10's color to black, that would really seal the deal.
None.
Using the Classic Trigger Editor, when I enter "185962" into there, it automatically changes the address to "0x0063FD0C".
Then when I enter "0x0063FD04" into the address, it changes back to "185960".
Using the text based Trigger Editor, I set the action to:
MemoryAddr(0x0063FD04, Set To, 589972);
Alas, I haven't been able to achieve the color change.
0x0063FD0C (185962) is the correct address. 0x[...]04 (185960) is the address of the CSprite entry, but the value you want to change is offset by 8 bytes (10 actually, but we can only read/write 4 bytes at a time), so set the value for 0x[...]0C (185962).
0x0063FD0C (185962) is the correct address. 0x[...]04 (185960) is the address of the CSprite entry, but the value you want to change is offset by 8 bytes (10 actually, but we can only read/write 4 bytes at a time), so set the value for 0x[...]0C (185962).
Ok so I set the action to:
MemoryAddr(0x0063fd0c, Set To, 589972);
This action takes place after P10 receives the Kerrigan. Still the same result, no color change.
None.
I tried it for myself on a test map and it works as expected. It must be that your infested kerrigan's CSprite entry is on a different address; I don't really see any other reason why it wouldn't work. I guess if you can send me your map, I could give you the address you need to modify, or otherwise find out why it's not working.
I tried it for myself on a test map and it works as expected. It must be that your infested kerrigan's CSprite entry is on a different address; I don't really see any other reason why it wouldn't work. I guess if you can send me your map, I could give you the address you need to modify, or otherwise find out why it's not working.
I PMed you the map if you'd like to take a look.
None.
Yeah, the entry was at a different address than I expected it to be: 185710 (0x0063F91C).
It just occurred to me that, alternatively, you could also simply give the unit to Player 7 or 8 and then Player 10, for example. Though it would then be white or green.
If there's an easy way to change P10's color to black, that would really seal the deal.
There used to be, but a while back the old team color arrays got deprecated or something by an SCR patch and I'm currently not aware of another way to directly edit the color values. Later tonight, I'll verify if it wasn't just a bug that got fixed later on.
However it might not be necessary as you probably could just make the above EUD set the sprite's color to a value above 15 (Player 16) or something instead of 9 (Player 10), whichever player number yields the color black in SCR. If you'd like to give it a try yourself, simply add 65536 to the value set in the trigger action to increment the Player ID by 1 (which would then yield Player 11's color).
Yeah, the entry was at a different address than I expected it to be: 185710 (0x0063F91C).
You're a boss! Works as expected now.
It just occurred to me that, alternatively, you could also simply give the unit to Player 7 or 8 and then Player 10, for example. Though it would then be white or green.
I thought about this but ultimately decided against it because I want Kerrigan to stand out as something important.
There used to be, but a while back the old team color arrays got deprecated or something by an SCR patch and I'm currently not aware of another way to directly edit the color values. Later tonight, I'll verify if it wasn't just a bug that got fixed later on.
However it might not be necessary as you probably could just make the above EUD set the sprite's color to a value above 15 (Player 16) or something instead of 9 (Player 10), whichever player number yields the color black in SCR. If you'd like to give it a try yourself, simply add 65536 to the value set in the trigger action to increment the Player ID by 1 (which would then yield Player 11's color).
I'm happy as it is, your solution works exactly how I want it to. Thanks!
None.