Hi guys, I'm trying to make ^ happen. I have created a trigger for it (I don't know if it can be done anyway else):
1.Unit enters region-> morph the control point from inactive to active, give player control of unit
2.Unit leaves region [if its still morphing][no units left in region, except the control point]-> cancel morph
3.If enemy unit enters region, morph the control point from active to inactive
->then after it finished the 1. starts
4.If hostile units are in region, do nothing (units from multiple players, being enemies)
You know, like in DoW. Now, I made this trigger:
Control Point Region [variable]= Convert Circle to Region
Center: Position of Unit
Unit: Closest Unit To Point
Point: Position of unit
Unit: Triggering Unit
Unit Group: Units in Region Matching Condition
Unit Type: Control Point [Inactive]
Region: Entire Map
Player: Any Player
Unit Filter: Excluded: Missile, Dead, Hidden
Count: Any Amount
Control Point Group [variable]= Units in Region matching Condition
Unit Type: Control Point [Inactive]
Region: Entire map
Player: Any Player
Unit filter: Excluded: Missile, Dead, Hidden
Count: Any Amount
The Trigger:
Event
Unit - Any Unit enters Region (Entire Map)
Actions
General - If then/else
IF: [Triggering unit] is in Control Point Region
Then
Unit - Order (Closest unit to (Position of (Triggering Unit)in Control Point Group) to Control Point - Activate)
Unit - Change ownership of (Closest unit to (Position of (Triggering Unit)) in Control Point Group) to player (Owner of (Triggering Unit)) and change color
Else
General - If then/else
IF: (Count of units in Control point Region having alliance Enemy with player (Owner of (Triggering Unit)) matching Excluded: Missile, Dead, Hidden, with at most Any amount) >=1
Then
Unit - Order (Closest unit to (Position of (Triggering Unit)in Control Point Group) to Control Point - Cancel)
Unit - Change ownership of (Closest unit to (Position of (Triggering Unit)) in Control Point Group) to player 0 and change color
Else
General - If then/else
IF: (Count of units in Control point Region having alliance Ally with player (Owner of (Triggering Unit)) matching Excluded: Missile, Dead, Hidden, with at most Any amount) <1
Then
Unit - Order (Closest unit to (Position of (Triggering Unit)in Control Point Group) to Control Point - Cancel)
Unit - Change ownership of (Closest unit to (Position of (Triggering Unit)) in Control Point Group) to player 0 and change color
Else
This is my trigger. I don't know whats the problem, but it's not working, and Error message:
Event responce function EventUnit has no matching event? Near line 27 in InitGlobals() map script galaxy
Please help!
Could "Event Unit - Any Unit enters Region (Entire Map)" be the problem? Like, this trigger is only activating when a unit enters the entire map such as spawning after building it. Also, the conditions about the regions are not about the event, but general in the actions. I don't know how to say.
Like, when a unit get close to a point, it does enter a region, but it's not "entire map". In this case, from what I think/know, I would believe that if you build a unit next to your Point and it spawns within, it would work, but if it spawns outside, it just execute the trigger because it has entered entire map, but does nothing because you're not in the specefic region.
-
Tested it and that's probably your problem. What I think you can do is either have a trigger for every specefic region... or make it in data just like the DoW remake actually published on battle.net. Something like a capture ability when you right click the point...
Hi guys, I'm trying to make ^ happen. I have created a trigger for it (I don't know if it can be done anyway else):
1.Unit enters region-> morph the control point from inactive to active, give player control of unit 2.Unit leaves region [if its still morphing][no units left in region, except the control point]-> cancel morph 3.If enemy unit enters region, morph the control point from active to inactive ->then after it finished the 1. starts 4.If hostile units are in region, do nothing (units from multiple players, being enemies)
You know, like in DoW. Now, I made this trigger:
Control Point Region [variable]= Convert Circle to Region Center: Position of Unit Unit: Closest Unit To Point Point: Position of unit Unit: Triggering Unit Unit Group: Units in Region Matching Condition Unit Type: Control Point [Inactive] Region: Entire Map Player: Any Player Unit Filter: Excluded: Missile, Dead, Hidden Count: Any Amount
Control Point Group [variable]= Units in Region matching Condition Unit Type: Control Point [Inactive] Region: Entire map Player: Any Player Unit filter: Excluded: Missile, Dead, Hidden Count: Any Amount
The Trigger:
Event Unit - Any Unit enters Region (Entire Map)
Actions General - If then/else
IF: [Triggering unit] is in Control Point Region
Then Unit - Order (Closest unit to (Position of (Triggering Unit)in Control Point Group) to Control Point - Activate) Unit - Change ownership of (Closest unit to (Position of (Triggering Unit)) in Control Point Group) to player (Owner of (Triggering Unit)) and change color
Else
General - If then/else
IF: (Count of units in Control point Region having alliance Enemy with player (Owner of (Triggering Unit)) matching Excluded: Missile, Dead, Hidden, with at most Any amount) >=1
Then Unit - Order (Closest unit to (Position of (Triggering Unit)in Control Point Group) to Control Point - Cancel) Unit - Change ownership of (Closest unit to (Position of (Triggering Unit)) in Control Point Group) to player 0 and change color
Else
General - If then/else
IF: (Count of units in Control point Region having alliance Ally with player (Owner of (Triggering Unit)) matching Excluded: Missile, Dead, Hidden, with at most Any amount) <1
Then Unit - Order (Closest unit to (Position of (Triggering Unit)in Control Point Group) to Control Point - Cancel) Unit - Change ownership of (Closest unit to (Position of (Triggering Unit)) in Control Point Group) to player 0 and change color
Else
This is my trigger. I don't know whats the problem, but it's not working, and Error message:
Event responce function EventUnit has no matching event? Near line 27 in InitGlobals() map script galaxy Please help!
Could "Event Unit - Any Unit enters Region (Entire Map)" be the problem? Like, this trigger is only activating when a unit enters the entire map such as spawning after building it. Also, the conditions about the regions are not about the event, but general in the actions. I don't know how to say.
Like, when a unit get close to a point, it does enter a region, but it's not "entire map". In this case, from what I think/know, I would believe that if you build a unit next to your Point and it spawns within, it would work, but if it spawns outside, it just execute the trigger because it has entered entire map, but does nothing because you're not in the specefic region.
-Tested it and that's probably your problem. What I think you can do is either have a trigger for every specefic region... or make it in data just like the DoW remake actually published on battle.net. Something like a capture ability when you right click the point...
Anyway, good luck.
Working on projects:
@Scbroodsc2: Go
Thanks, I'll try it. I remade my trigger with 'Unit is Attacked', but capture sounds better.