HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

triggering waygate animation?

01-10-2003, 02:49 PM#1
Guest
I have a map with a way gate near each player, and wrote triggers that go off when a player targets a waygate other than the waygate nearest them. Unfortunately, now the waygate won't transport anyone but the player who doesn't set off the trigger (the player whose start position is nearest the waygate). This is true regardless if they match all the conditions in the trigger or not (in this case, with or without a hero).
The triggers look like:
:D TRIGGER: + Hero Uses Player 1 Way Gate
EVENTS: + Unit - A unit owned by Player 2 (Blue) Is issued an order targeting an object
+ Unit - A unit owned by Player 3 (Teal) Is issued an order targeting an object
CONDITIONS: + (Region 031 <gen> contains (Target unit of issued order)) Equal to True
+ ((Triggering unit) is A Hero) Equal to True
ACTIONS: + Unit - Change ownership of (Triggering unit) to Neutral Hostile and Change color

(This trigger is particularly nasty in that for some reason once you kill the hero he can't be reanimated by the altar -- I guess because he still belongs to neutral hostile. I actually like this, but I suppose it is possible to change that with some rule that checks if a hero who is in array-hero dies then change ownership of hero to array-hero-index[index of array-hero]... and setting these arrays in the above trigger. You'd also need to remove the hero from array-hero and array-hero-index when this is done. I would like to see what that would look like, I haven't delved into arrays yet.)

So, anyway, I need to write a trigger that transports the units when they get to the waygate. As much as possible I want the trigger to replicate the effect of the waygate. This means I need to (a) move the troups, (b) play the waygate activation sound (which I can't find so now I'm playing some other sound), (3) Ping the minimap, and (quatro) play the waygate activation animation for the triggering unit. I've got all of it but the last part... the trigger looks like:
:nono: TRIGGER: Fix Player 1 Way Gate
EVENTS: + Unit - A unit enters Region 031 <gen>
CONDITIONS: + (((Triggering unit) is in (Units owned by Player 2 (Blue))) Equal to True) or (((Triggering unit) is in (Units owned by Player 3 (Teal))) Equal to True)
ACTIONS: + Sound - Set Position of WayGateWhat1 <gen> to (Position of (Triggering unit)) with Z offset 0.00
+ Sound - Play WayGateWhat1 <gen>
+ Unit - Move (Triggering unit) instantly to (Center of Region 026 <gen>)
+ Cinematic - Ping minimap for (All players matching (((Triggering player) is in (All Players)) Equal to True)) at (Center of Region 026 <gen>) for 1.00 seconds

I'm hoping this rule won't break the waygate since it's event is not related directly to the waygate, but instead to a region which contains the waygate. In this way any differences between the regular waygate activation and this trigger will only be visible to the errant player using the distant waygate. The thing is, I have no idea how to get that waygate activation animation to play for each unit (what I mean is the little white circles that appear around the unit when it is transported).

Thanks for your time,
RobC emote_confused
01-10-2003, 10:10 PM#2
Guest
Ok, wierd thing, I found a special effects browser and set the special effects in my fix trigger, and tried it out... Sometimes the effects go off and sometimes they do not (rather randomly, but only going off correctly about 3 in 4 times). As it was worded before the trigger would not work for the player excluded, and the trigger precluded the waygate working naturally, so I had to make a change (also, the special effect plays the sound for me, when it goes off, so there's no need to load a sound). Here's the fix trigger now:

TRIGGER: Fix Player 1 Way Gate
EVENTSL Unit - A unit enters Region 031 <gen>
CONDITIONS: -none-
ACTIONS: Special Effect - Create a special effect attached to the overhead of (Triggering unit) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdx
Unit - Move (Triggering unit) instantly to (Center of Region 026 <gen>)
Special Effect - Destroy (Last created special effect)
Cinematic - Ping minimap for (All players matching (((Triggering player) is in (All players)) Equal to True)) at (center of Region 026 <gen>) for 1.00 seconds


The special effects are close enough to working for me not to care. But the minimap ping isn't working. :( I probably need to write seperate rules for each player so I can get rid of the "Triggering player" part(?). Ugh, I was hoping this wouldn't be so sloppy.