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
I'm trying to make a space-based diplomacy map with a format similar to one small square (with only enough room to fit a doodad) next to a larger square.
The smaller platform would have just enough room for a doodad to be placed, whereas the larger platform would be notably larger than the other and have room to build structures, units, etc.
The idea is that when a Player's units are the only units located on Platform B, an Engineering Bay of that Player's color will spawn above Platform A on top of the doodad (and when the timer resets to 2:00 will receive minerals for that "planet").
However, I also want the EB that spawns above Platform A to be destructible (e.g., 9000/9000 HP) so that if someone comes and destroys Player 1's EB above Platform A, one of two things will happen:
1. All of Player 1's units will die, structures will explode, and a EB of Player 2's color will appear above Platform A.
2. All of Player 1's units and structures will become Player 2's, and a EB of Player 2's color will appear above Platform A.
How do I do this?
Would this be overly complicated?
Any feedback would be great, thanks.
This is all just a question of conditions. They are all very easy, but there are a few things to consider. Here is a first shot though I may have overlooked a situation which would require another condition or whatever. In any case this is a solid basis on that you can make more advanced things (or fix slips of the pen).
First of all, the doodad doesn't make any difference at all. Its the location that matters.
Secondly, if I remember correctly then you can't create floating buildings above non-buildable terrain, so you need a cache for the EB. More about that later.
Have two locations covering the areas: 'base1 s'(mall) 'base1 l'(arge)
And 1 location 'cache' (make it larger if you get unplacable errors ingame) where you create the lifted EBs.
Creating an EB for a newly conquered planet:Human players
Conditions:Current player brings a least 1 [any unit] to 'base1 l'
Current player brings at most 0 EB to 'base1 s'
Foes brings at most 0 [any unit] to 'base1 l'
Actions:Kill all EB of all players at 'base 1s'
Move all EB of neutral from 'base1 s' to 'cache'
Move 1 EB of player <see *3)> from 'cache' to 'base1 s'
Give 1 EB of player <see *3)> to Current player
preserve trigger
Giving all buildings to the attacker on EB kill:Human players
Conditions:Current player brings a least 1 [any unit] to 'base1 s'
Current player brings at most 0 EB to 'base1 s'
Foes brings at most 0 [any unit] to 'base1 s' . . . . . . . . . . . . . . . . *1)
Actions:Give all buildings of all players at 'base1 l' to current player
Give all buildings of neutral players at 'base1 l' to current player . . . .*2)
preserve trigger
to *1) This means you cant lose your planet as long as you have a fleet in orbit, even when your EB is destroyed. You can add a few ideas here like make an extra trigger that kills all or a few of your buildings when you lose the EB.
to *2) This would cover the buildings from leavers also since all players doesn't include neutral. I was always annoyed by those neutral buildings when I was taking over planets of leavers.
EB Cache (Location 'cache' over buildable terrain):Comp player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . *3)
Conditions:Current player brings a most 5 EB to 'cache'
Actions:Create 1 EB with properties lifted at 'cache'
preserve trigger
to *3) If you have no comp player create the EBs for 'player 1' and give them to neutal in the 2nd action.
In any case make sure that the move and give EB actions in the 1st trigger refer to the player that owns the EBs here (comp or neutral). Oh and before you ask: You can't create units for neutral.
If you have any questions or if you think I forgot sth. (very well possible, since I did all that just in my imagination) just tell me.
Post has been edited 1 time(s), last time on Nov 5 2007, 10:55 am by NudeRaider.