I think you'll find the problem here is the units that are supposed to meet are NOT preset, nor are they stationary. They could be any two randomly moving units on the map owned by either player. The way I've set mine up, when any of unit from one side or the other comes into contact one will try to attack the other, but as soon as they auto target to attack, it forces an allience with shared viewing.
Melee Initialization = Action - Player - Make player 1 and player 2 treat each other as Enemy
New Element = Event - Unit - Any Unit aquires a target
Conditions - (Owner of (Triggering Unit)) == 1
And
Conditions
(Owner of (Aquired Target)) == 2
Actions - Player - Make player 1 and player 2 treat each other as Ally With Shared Vision
New Element 2 = Event - Unit - Any Unit aquires a target
Conditions - (Owner of (Triggering Unit)) == 2
And
Conditions
(Owner of (Aquired Target)) == 1
Actions - Player - Make player 1 and player 2 treat each other as Ally With Shared Vision
It works, as far as I can tell when I tested it, I tried putting in an Or condition instead of having 2 Elements, but that seemed to break it.
Okay been looking at some of the commands, you could try a more inclsuive conditional statement to check for the entering unit script, something like(probably not owrded correctly):
If Unit - Unit (Owner of Unit == (Get Player Ally == True)) enters within 3.0 of Unit
Something like that... Don't have the editor on this PC so i'm flying blind so to speak. But a conditional statement that will check if an allied players unit has entered the area of any of your units. since it only checks for an allied state and not a number it simplifies it to a single condition.
This may seem alittle silly, but it's another method that will work.
Unit Acquires Target
void TriggerAddEventUnitAcquiredTarget(unit u)
This event fires when a unit acquires a target. Use "Acquired Target" to get the target that was acquired. Use "Triggering Player" to get the owner of the unit that acquired a target. Use "Triggering Unit" to get the unit that acquired a target.
So as soon as two units come into contact they will target to attack each other, if you run an interupt script that automatically causes them to ally the second they target each other to attack, that should stop them from actually attacking. It's a viable if some what round the houses method.
Wow, one of my suggestions worked? Glad I could be of help, I noticed alot of posts asking about this, so I wracked my brains over a solution that didn't include external sources. And all I could come up with was the fact that kills = exp, so why not just award kills for every action thats not a kill, and i'll be damned if it worked. :)
So how about have the terrans turn up from the west to where you pushed to, they want the artifact to, since they plan to weaponise it against the zerg, but it's a protos artifact so you'll be damned if you want them to have it. Put them on say a 15 minute timer giving you time to put up a defense. The idea of grabbing the artifact is that you need it to eliminate a terran Proto-type battlecruiser they are sending against you, Odin meet your flying brother Fáfnir the fire breathing doom. Guess they really want that artifact if they are breaking out the big guns.
This event fires when a unit uses an ability. Use "Triggering Ability" to get the ability that was used. Use "Triggering Ability Stage" to get the stage the ability was in when the event fired. Use "Triggering Ability Target Point" to get the target point for the ability. Use "Triggering Ability Target Unit" to get the target unit for the ability. Use "Triggering Player" to get the player that used the ability. Use "Triggering Unit" to get the unit that used the ability.
Use that event and then award the exp for if.
If you're having trouble awarding EXP, there's one work around I can think of, it's sloppy but it should work.
When the healer triggers his heal ability, have it spawn a custom Unit that is invisible and passive, when the heal ends, have the medic trigger a kill action on that unit, it should award exp to the medic.
Not done much with the editor myself So this is purely speculation based on what prgramming I do know.
Can you not just create a loop set to repeat 3 times with a unit type check so you don't accidently kill anything but marines?
something like:
void libNtve_gf_Repeat(int count)
Repeats an action set a specified number of times.
Found this in the Galaxy / Triggers / Repeat section, this will repeat a kill action 3 times for you, all you need to do is use the bool UnitFilterMatch(unit inUnit, int inPlayer, unitfilter inFilter) filter to make sure it's killing a marine instead of all living units. that SHOULD work.
Unit - Kill (Unit (Number of Living units in Buy marine) from Buy marine)
Is there no way to change 'Number of Living' to a unit type check and then tell it to effect 3 of those type, sorry haven't got the editor open so I can't check for specific commands.
1. Can't just just have a event that sets the HP back to maximum at the same time that is changes sides?
7. He means how do you join units into one unti, like the Uberlisk with it's killer dreadlocks. I beleive he wants to put a pop up perdition turret on a bunker. For that you'd have to do join them at an attachment point, that's the limit of my knowledge though i'm affraid.
I'm sure you can insert a mathmatical equation into it somewhere, but for the life of me I can't remember how. I know i saw it in one of OneTwo's tutorials on selling turrets for a % cost though.
Would having the players neutral with each other and then setting them to allied when in range do that same job?
If so i'm sure you can use the same sort of script that changes a neutral shop into your own shop, to trigger allying of players. Maybe have a point/region or building that will do the trick? Just some ideas if you can't make the unit thing work.
Alternativly, maybe a targeted ability if all else fails, it would bypass the need for a check and make the players have something more to do than just find each other. It's not perfect but it should workas a last ditch effort.
Would that tint only be visible to the player who's unit is seeing the enemies though? Since the thermal vision would apply to none hidden units aswell, as they would have a heat source too, infact it would apply to ALL units on the map in visible range of the unit using that ability, but only that players unit, or maybe his allies too, dunno on that one, depends what makes it balanced since it would be a hero ability.
0
@obliviron: Go
I think you'll find the problem here is the units that are supposed to meet are NOT preset, nor are they stationary. They could be any two randomly moving units on the map owned by either player. The way I've set mine up, when any of unit from one side or the other comes into contact one will try to attack the other, but as soon as they auto target to attack, it forces an allience with shared viewing.
0
Melee Initialization = Action - Player - Make player 1 and player 2 treat each other as Enemy
New Element = Event - Unit - Any Unit aquires a target
Conditions - (Owner of (Triggering Unit)) == 1
And
Conditions
(Owner of (Aquired Target)) == 2
Actions - Player - Make player 1 and player 2 treat each other as Ally With Shared Vision
New Element 2 = Event - Unit - Any Unit aquires a target
Conditions - (Owner of (Triggering Unit)) == 2
And
Conditions
(Owner of (Aquired Target)) == 1
Actions - Player - Make player 1 and player 2 treat each other as Ally With Shared Vision
It works, as far as I can tell when I tested it, I tried putting in an Or condition instead of having 2 Elements, but that seemed to break it.
0
@PurpleFantum: Go
Okay been looking at some of the commands, you could try a more inclsuive conditional statement to check for the entering unit script, something like(probably not owrded correctly):
If Unit - Unit (Owner of Unit == (Get Player Ally == True)) enters within 3.0 of Unit
Something like that... Don't have the editor on this PC so i'm flying blind so to speak. But a conditional statement that will check if an allied players unit has entered the area of any of your units. since it only checks for an allied state and not a number it simplifies it to a single condition.
0
This may seem alittle silly, but it's another method that will work.
Unit Acquires Target
void TriggerAddEventUnitAcquiredTarget(unit u)
This event fires when a unit acquires a target. Use "Acquired Target" to get the target that was acquired. Use "Triggering Player" to get the owner of the unit that acquired a target. Use "Triggering Unit" to get the unit that acquired a target.
So as soon as two units come into contact they will target to attack each other, if you run an interupt script that automatically causes them to ally the second they target each other to attack, that should stop them from actually attacking. It's a viable if some what round the houses method.
0
@QMJ3: Go
Can't you just use a hidden tag to hide them?
0
@smashbox: Go
Wow, one of my suggestions worked? Glad I could be of help, I noticed alot of posts asking about this, so I wracked my brains over a solution that didn't include external sources. And all I could come up with was the fact that kills = exp, so why not just award kills for every action thats not a kill, and i'll be damned if it worked. :)
0
So how about have the terrans turn up from the west to where you pushed to, they want the artifact to, since they plan to weaponise it against the zerg, but it's a protos artifact so you'll be damned if you want them to have it. Put them on say a 15 minute timer giving you time to put up a defense. The idea of grabbing the artifact is that you need it to eliminate a terran Proto-type battlecruiser they are sending against you, Odin meet your flying brother Fáfnir the fire breathing doom. Guess they really want that artifact if they are breaking out the big guns.
0
@smashbox: Go
I'm no genius, but I think:
Unit Uses Ability
This event fires when a unit uses an ability. Use "Triggering Ability" to get the ability that was used. Use "Triggering Ability Stage" to get the stage the ability was in when the event fired. Use "Triggering Ability Target Point" to get the target point for the ability. Use "Triggering Ability Target Unit" to get the target unit for the ability. Use "Triggering Player" to get the player that used the ability. Use "Triggering Unit" to get the unit that used the ability.
Use that event and then award the exp for if.
If you're having trouble awarding EXP, there's one work around I can think of, it's sloppy but it should work.
When the healer triggers his heal ability, have it spawn a custom Unit that is invisible and passive, when the heal ends, have the medic trigger a kill action on that unit, it should award exp to the medic.
0
@copperfront: Go
Not done much with the editor myself So this is purely speculation based on what prgramming I do know.
Can you not just create a loop set to repeat 3 times with a unit type check so you don't accidently kill anything but marines?
something like:
void libNtve_gf_Repeat(int count)
Repeats an action set a specified number of times.
Found this in the Galaxy / Triggers / Repeat section, this will repeat a kill action 3 times for you, all you need to do is use the bool UnitFilterMatch(unit inUnit, int inPlayer, unitfilter inFilter) filter to make sure it's killing a marine instead of all living units. that SHOULD work.
0
@copperfront: Go
Missed the last part, yeh >= 3.
Unit - Kill (Unit (Number of Living units in Buy marine) from Buy marine)
Is there no way to change 'Number of Living' to a unit type check and then tell it to effect 3 of those type, sorry haven't got the editor open so I can't check for specific commands.
0
1. Can't just just have a event that sets the HP back to maximum at the same time that is changes sides?
7. He means how do you join units into one unti, like the Uberlisk with it's killer dreadlocks. I beleive he wants to put a pop up perdition turret on a bunker. For that you'd have to do join them at an attachment point, that's the limit of my knowledge though i'm affraid.
0
@Thenarden: Go
So the inventory wouldn't stay open but auto open while you have a hero unit selected? Don't see why that wouldn't work.
0
I'm sure you can insert a mathmatical equation into it somewhere, but for the life of me I can't remember how. I know i saw it in one of OneTwo's tutorials on selling turrets for a % cost though.
0
Would having the players neutral with each other and then setting them to allied when in range do that same job?
If so i'm sure you can use the same sort of script that changes a neutral shop into your own shop, to trigger allying of players. Maybe have a point/region or building that will do the trick? Just some ideas if you can't make the unit thing work.
Alternativly, maybe a targeted ability if all else fails, it would bypass the need for a check and make the players have something more to do than just find each other. It's not perfect but it should workas a last ditch effort.
0
@Molsterr: Go
Would that tint only be visible to the player who's unit is seeing the enemies though? Since the thermal vision would apply to none hidden units aswell, as they would have a heat source too, infact it would apply to ALL units on the map in visible range of the unit using that ability, but only that players unit, or maybe his allies too, dunno on that one, depends what makes it balanced since it would be a hero ability.