Staredit Network

Staredit Network -> UMS Assistance -> [SOLVED] Allie/Unallie triggers
Report, edit, etc...Posted by rockz on 2006-01-18 at 17:51:41
I've been brainstorming about making a new map that allows you to use an auto target system (i.e... attack command while unallied) and a manual target (i.e... attack the target itself while allied).

I plan on having a civilian in a corner somewhere, controlling the targeting system desired. I also plan on using an experience system, but only while using the manual target (after all, there has to be some incentive).

Of course, this has already been implemented in Snipers Bald Locks, but like all good maps its secrets remain deep within its Proedit or Uber@tion protection, and I'm too lazy to find how it was protected so I can unprotect it. The way it works in snipers, if you don't know, is that when you un-ally, it will re-ally automatically(and give you a warning never to un-ally again or you lose).

I could use the obvious answer where I just continuously reapply the ally over and over, but then it's impossible to lock a target from a distance or continuously attack a single target without repeated attack commands.

So how would I go about making a set of triggers that allows a player to automatically ally the enemy by bringing a unit to a location, and if the player manually un-allies while on that location, the ally automatically reapplies?
Report, edit, etc...Posted by LegacyWeapon on 2006-01-18 at 17:56:19
You use Hyper Triggers in combination with the "SET ALLIANCE" action.
Report, edit, etc...Posted by rockz on 2006-01-18 at 20:43:43
QUOTE(LegacyWeapon @ Jan 18 2006, 05:56 PM)
You use Hyper Triggers in combination with the "SET ALLIANCE" action.
[right][snapback]409870[/snapback][/right]

I must be doing this wrong:
Trigger
Players:
¤ Player 1
Conditions:
¤ Always
Actions:
¤ Set Player 2 to Ally
¤ Preserve Trigger

When I do this (in conjunction with hyper triggers for player 2) my Devourer can't attack a Wraith owned by Player 2. Also, if the wraith moves, the Devourer won't even move to go attack him, he just goes back to "stop".

To clarify, I want the Devourer to be able to attack a Wraith across a map, while the Devourer is allied to the Wraith. If and only if the Devourer un-allies Player 2, then the trigger kicks in to re-ally Player 2. I can put the correct units and changing alliance status stuff later.
Report, edit, etc...Posted by Rantent on 2006-01-19 at 02:09:10
I think I see what your getting at, but I don't see why. Oh well.

I suppose the only way to detect if they unallied would be to run a trigger for if foes command at exactly one wraith of if allies command 0 wraith. (If there is only one wraith out there.) You don't want it constantly allying the wraith to the devourer owner. Because that gives you weird things like when you attack the allies, your unit simply twitches into an attacking position but doesn't attack.
Simply go if foes command any unit, set all players to ally or something. wink.gif
Report, edit, etc...Posted by rockz on 2006-01-19 at 10:04:17
QUOTE(Rantent @ Jan 19 2006, 02:09 AM)
I think I see what your getting at, but I don't see why. Oh well.

I suppose the only way to detect if they unallied would be to run a trigger for if foes command at exactly one wraith of if allies command 0 wraith. (If there is only one wraith out there.) You don't want it constantly allying the wraith to the devourer owner. Because that gives you weird things like when you attack the allies, your unit simply twitches into an attacking position but doesn't attack.
Simply go if foes command any unit, set all players to ally or something. wink.gif
[right][snapback]410493[/snapback][/right]

I'm not sure I get what you are suggesting. You seem to understand my problem, so I'll try to explain it a bit more to clarify:

I'm making a special forces map, where you get money when you kill stuff, but only when you manually attack said allied enemy. You can use the unally (auto target) and everything, but since that requires little aiming skill, I don't want the player to get money for such a kill.

So I don't want the ally to reset every 84 milliseconds. I know I can put a wait in there to wait something like 10 seconds before re-applying the ally, but Snipers Bald Locks seems to have developed a way to do this perfectly.
Report, edit, etc...Posted by StarmanJr. on 2006-01-19 at 11:40:36
You really shouldn't refresh alliance status in conjunction with Hyper Triggers if you want manual targeting. What usually happens is that you'd have to use the Attack command like crazy just to initiate the attack animation of any unit and because it refreshes quickly from Hyper Triggers, you'd end up dealing 0 damage (except for melee units since they attack fast enough)

I'm not sure if I'm addressing your problem correctly, so I'm sorry if I'm not...

When you place the cursor onto the location to ally the computer, it should be something like:

Trigger
Description:
Ally Computer
Players:
¤ Current Player
Conditions:
¤ Current Player brings at least 1 men to "Location X"
¤ Current Player has at least 1 opponent
Actions:
¤ Preserve Trigger
¤ Set All Players to Ally
¤ Display Text Message: "Don't take off alliance"


The problem with this is that it would also check whether or not you take alliance off your allies.
Report, edit, etc...Posted by IanMM on 2006-01-19 at 12:50:13
This is the easy way.

Trigger
Players:
¤ Enimies
Conditions:
¤ Always
Actions:
¤ Set all enimies to alie
¤ preserve trigger
Report, edit, etc...Posted by rockz on 2006-01-19 at 16:45:30
Okay, for those of you who STILL don't understand:

I need a trigger like this:


Trigger
Description:
Ally Trigger
Players:
¤ Force 1
Conditions:
¤ Current Player brings 1 Probe to 'Ally'.
¤ Force 2 set to Enemy for Current Player.
Actions:
¤ Set Force 2 to Ally for Current Player.
¤ Preserve Trigger.


As far as I know, there is no way to make that second condition happen.

If I do what people have suggested so far (all of them are the same, by the way), then I will have to manually click on each shot. Since Ghosts attack nearly three times as slow as Marines, this would not be fair to them. Also, it is incredibly annoying to have to reclick each time. All I want is for some unit to attack something until it is dead with one "a" + left click, all the while keeping ally on. If the player happens to unally, the ally immediately comes back on, but ONLY if the player unallies.

If anyone still doesn't understand this, please, go onto battle.net and play a round of Snipers Bald Locks. Unally as soon as you get into the game.
Report, edit, etc...Posted by Wing-of-no-Wing on 2006-01-19 at 16:55:31
The map doesn't actually detect the fact that you have unallied the enemy, but rather that your enemies now have units, since you now have enemies. When you were allied to them, the game didn't count them under "enemies" for the point of your triggers, since it has no way of knowing that someone set to your ally is actually an opponent. When you unallied them, though, the game knew to count them under "foes" for the purposes of "foes bring at least one any unit to anywhere". That sets off the trigger. Note that the "at least one any unit to anywhere" part of that trigger can be varied as necessary.

So, for what you want to do, have the conditions of your trigger be that manual mode is set (denote or detect it however you wish) and that "foes" bring (something that the enemy force has got...go ahead and use "any unit" if you don't want the player to have other enemies that are excluded from this consideration, if you do, use something that the included enemies have and the excluded enemies do not) to (use anywhere, or a specific location if you have reason to do so).
Report, edit, etc...Posted by PCFredZ on 2006-01-19 at 17:29:48
QUOTE(Wing-of-no-Wing @ Jan 19 2006, 04:55 PM)
The map doesn't actually detect the fact that you have unallied the enemy, but rather that your enemies now have units, since you now have enemies. When you were allied to them, the game didn't count them under "enemies" for the point of your triggers, since it has no way of knowing that someone set to your ally is actually an opponent. When you unallied them, though, the game knew to count them under "foes" for the purposes of "foes bring at least one any unit to anywhere". That sets off the trigger. Note that the "at least one any unit to anywhere" part of that trigger can be varied as necessary.

So, for what you want to do, have the conditions of your trigger be that manual mode is set (denote or detect it however you wish) and that "foes" bring (something that the enemy force has got...go ahead and use "any unit" if you don't want the player to have other enemies that are excluded from this consideration, if you do, use something that the included enemies have and the excluded enemies do not) to (use anywhere, or a specific location if you have reason to do so).
[right][snapback]410699[/snapback][/right]

The exact condition described would be "Foes command at least 1 men".
Report, edit, etc...Posted by rockz on 2006-01-19 at 17:36:47
QUOTE(Wing-of-no-Wing @ Jan 19 2006, 04:55 PM)
The map doesn't actually detect the fact that you have unallied the enemy, but rather that your enemies now have units, since you now have enemies. When you were allied to them, the game didn't count them under "enemies" for the point of your triggers, since it has no way of knowing that someone set to your ally is actually an opponent. When you unallied them, though, the game knew to count them under "foes" for the purposes of "foes bring at least one any unit to anywhere". That sets off the trigger. Note that the "at least one any unit to anywhere" part of that trigger can be varied as necessary.

So, for what you want to do, have the conditions of your trigger be that manual mode is set (denote or detect it however you wish) and that "foes" bring (something that the enemy force has got...go ahead and use "any unit" if you don't want the player to have other enemies that are excluded from this consideration, if you do, use something that the included enemies have and the excluded enemies do not) to (use anywhere, or a specific location if you have reason to do so).
[right][snapback]410699[/snapback][/right]

Wing-of-no-Wing, thank you for that. I needed the explanation along with the trigger StarmanJr. gave me. I also didn't have much time to absorb and read his explanation, unfortunately. I spoke before I thought. Everyone else, thanks for the responses.

This is solved now.
Next Page (1)