It would be so much easier using DCs and a location centered on your hero at the beginning of every loop. It's pretty basic but here's how it works anyway:
Let...
- dcHero be a death counter that indicates which unit your hero is
- dcDialog be a death counter that indicates which unit you're talking to
- dcWait be the variable that refreshes the text at regular intervals.
- CL be a 2x2 or 1x1 location
- Pixel be a pixel location
- world be the location that covers the playing field (could be anywhere).
Let's say your first hero is a zealot, your second a marine and so on...
Trigger 1.1 (centers a location on hero)
Conditions:
-Current player has suffered exactly 1 deaths of dcHero
Actions:
-Move location CL on zealot owned by current player at World
-Move location Pixel on zealot owned by current player at World
-Preserve trigger
Trigger 1.2Conditions:
-Current player has suffered exactly 2 deaths of dcHero
Actions:
-Move location CL on marine owned by current player at World
-Preserve trigger
...
Say you want to talk to a civ owned by player 9:
Trigger 2.1 (initiate conversation)
Conditions:
-Player 9 brings at least 1 civilian to CL
*Whatever activates conversation*
Actions:
-Set dcDialog deaths for current player to 1
-Play wav "..." (optional)
...
Trigger 3.1 (conversation trigger)
Condtions:
-Current player has suffered exactly 1 deaths of dcDialog
-Current player has suffered exactly 0 deaths of dcWait
Actions
-Display text "..."
-Set dcWait deaths for current player to X (usually from 100 to 200)
-Preserve trigger
...
Trigger 4 (holds unit in place)
Conditions:
-Current player has suffered at least 1 deaths of dcDialog
Actions:
-Move all men owned by current player at pixel to pixel
-Preserve trigger
Trigger 5 (dialog refresh delay)
Conditions:
-Current player has suffered at least 1 deaths of dcWait
Actions:
-Subtract 1 deaths of dcWait for current player
-Preserve trigger
Note:You don't need to use a different unit every time; you could just have locations over certain "areas". For example, have a civ owned by p9-12 in every area. You'd then also need to detect in which area your hero is located (trivial).
None.