In my solution, the players would have a gateway to cast 4 different spells.
Yours probably differ, but the core system remains.
What we need:
- Some triggers, most obviously
- One deathcounter, used as a timer and to determine if P2 is forced to cast the same spell. This counter is called '
Timer'
- One switch, to determine if the recording has started. Lets call this one: "
isRecording".
- One switch, to determine if the spell is running. Letscall this one: "
isRunning".
- 3 Locations for the system itself.
- - - one is located over P2's gateway
- - - one is located on a 2x2 square somewhere else, size: 2x2 :: Called '
TriggerLoc'- - - one is located on a 2x2 square somewhere else, size: 2x2 :: Called '
SavedLoc' :: It is a 2x2 island which is blocked by photon canon or other 2x2 building
Further I assume that this P1-Recording-Spell is triggered via training a Dragoon. P1's gateway is located in the location '
P1 Gateway'.
The Triggers:// To start the recording:
Condition: Player 1 brings at least 1 Dragoon to 'P1 Gateway'
Condition: Switch 'isRecording' is Not Set
Action: Remove all Dragoon for Player 1 at 'P1 Gateway'
Action: Set Switch: Set 'isRecording'
Action: Remove Photon Canon from all Players at SavedLoc
// To finish the recording
Condition: Player 1 brings at least 1 Dragoon to 'P1 Gateway'
Condition: Switch 'isRecording' is Set
Action: Remove all Dragoon for Player 1 at 'P1 Gateway'
Action: Set Switch: Unset 'isRecording'
Action: Set Switch: Set 'isRunning'
Action: Set Deaths of 'Timer' to '600' for Player 1
(the value 600 is just a random number. You can adjust this)// Player 2's spells should trigger like this usually:
Condition: Player 2 brings at least 1 X to 'P2 Gateway'
Condition: Deaths of 'Timer' for Player 1 equals 0
Action: Remove all [men] from P2 at TriggerLoc
Action: Teleport [men] from P2 Gateway to TriggerLoc
// The spells for P2 are performed when a unit is in that TriggerLoc, thus
Condition: Player 2 brings at least 1 Zealot to 'TriggerLoc'
Action: Remove all [men] for All Players at SavedLoc
Action: Teleport all [men] from TriggerLoc to SavedLoc
Action: Remove all [men] for All Players at TriggerLoc
Action: [Spell 1...]
Condition: Player 2 brings at least 1 Dragoon to 'TriggerLoc'
Action: Remove all [men] for All Players at SavedLoc
Action: Teleport all [men] from TriggerLoc to SavedLoc
Action: Remove all [men] for All Players at TriggerLoc
Action: [Spell 2...]
(and so on for all spells)// Now, the actual trick. You need 1 trigger for each spell sadly, and this fast, I can't think of a simpler solution. But you do not have to copy any effect.
Condition: Player 2 brings at least 1 [men] to 'P2 Gateway'
Condition: Deaths of 'Timer' for Player 1 is at least 1
Condition: Player 2 brings at least 1 Zealot to SavedLoc
Condiiton: isRecording is not set
Action: Remove all [men] for Player 2 at P2 Gateway
Action: Create 1 Zealot at TriggerLoc for Player 2
Condition: Player 2 brings at least 1 [men] to 'P2 Gateway'
Condition: Deaths of 'Timer' for Player 1 is at least 1
Condition: Player 2 brings at least 1 Dragoon to SavedLoc
Condiiton: isRecording is not set
Action: Remove all [men] for Player 2 at P2 Gateway
Action: Create 1 Dragoon at TriggerLoc for Player 2
(and so on for all spells)// When the spell expired...
Condition: Deaths of 'Timer' for Player 1 is exactly 0
Condition: Switch isRunning is Set
Action: Unset switch isRunning
Action: Remove all [men] at SavedLoc
Action: Create 1 Photon Canon at SavedLoc
I've done this concept in a hurry, so maybe there is a mistake. But it looks correct on the first glaze.
This is what it basically does:
- Spells for Player2 are only executed when the according unit is in "TriggerLoc".
- Every Spell tries to teleport the triggering unit (Zealot, Dragoon...) to "SavedLoc", which is - while the Spell is not running - blocked by a building, and then kills the unit if it failed to teleport
- While not recording, but the spell is running, the SavedLoc is not blocked. It contains 1 and always that 1 unit-type (Zealot, Dragoon...)
- In this state, P2 building a unit only indicates when to fire a spell, but it will always look what unit is held in the SavedLoc and use that Unit/Spell and ignore the one P2 has just built.
- - It copies that unit and creates it at the TriggerLoc, which will trigger the Spell. It actually replaces the Unit in "SavedLoc" with the newly created one in "TriggerLoc", but that doesn't matter since it is the same type
- When the spell expires, you create the former situation again by replacing the saved unit with the photon canon.
Maybe this works.
And now I am hoping you were using a "Train Unit to Cast" system.
EDIT: I forgot the trigger to decrease the timer
Condition: Always
Action: Subtract 1 death of Timer for Player 1
All Triggers are preserved.
Post has been edited 1 time(s), last time on Mar 19 2014, 1:07 pm by Devourer.
Please report errors in the Staredit.Network forum.