There is a trigger for capturing points with buidings, its work almost right, only bug its when you trying recapture point when already enemy have buidings in range. Then u need first clear area and ONLY then build your building, else if u build ur building before killing enemy point dont be captured and u will need add 1 more building there
Firstly, create a region named Resource #05 and attach it to your Resource #05 unit. This make it easier to work with in the editor, and is what you're telling the editor to create anyway. Took out the leaving event, as it's basically worthless. The leaving unit cannot be within the range of the Resource and be leaving at the same time, so the trigger would never run when a unit leaves the area.
ResourceCapture5EventsUnit-AnyUnitEntersResource#05Unit-AnyUnitdiesLocalVariablesNumberofUnits=(CountofAnyunitsinResource#05ownedbyplayerAnyPlayermatchingRequired:Ground,Structure;Excluded:Missile,Dead,Hidden,withatmostAnyAmount)<Integer>Conditions-------Thisisbasicallywhatyouhadherebefore,justnotnearlyaslong,andfareasiertoread.-------Notethatandsarenotneededandonlymakeitmoredifficulttoread.((Triggeringunit)isinResource#05)==TrueNumberofUnits>0ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If-------Iftheunitenters:-------Checktoseeiftheunitthatenteredhasanyenemiesintheregion.(CountofunitsinResource#05havingallianceEnemywithplayer(Triggeringplayer)matchingRequired:Ground,Structure;Excluded:Player,Ally,Neutral,Missile,Dead,Hidden,withatmostAnyAmount)==0ThenUnit-ChangeownershipofResource#05unittoplayer(Triggeringplayer)andChangeColorElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If-------Ifaunitdiesintheregion:-------Basicallythesameasaboveforthefirstpart,exceptthattheadditionisthatthe-------playerhastohaveabuildingtherealready,oritdoesn't matter. (Count of units in Resource #05 having alliance Enemy with player (Killing player) matching Required: Ground, Structure; Excluded: Player, Ally, Neutral, Missile, Dead, Hidden, with at most Any Amount) == 0 (Count of Any units in Resource #05 owned by player (Killing player) matching Required: Ground, Structure; Excluded: Missile, Dead, Hidden, with at most Any Amount) > 0 Then Unit - Change ownership of Resource #05 unit to player (Killing player) and Change Color Else
I already have point #5 attachedto unit resource #5, so u sure need region when I use function "convert circle in region"?, when I set region as point #5 with range 5.0?
And I need a bit more. Trigger must check not only enemyes in area but also neutral human players and allyes, so if u already capture point no one,even ally, cant recapture it without killing ur buildings in region.
Building appear in region(builded there or moved in), then: 1. If there no any another building in region, beacon captured 2. If there already any building that controlled by not this player then: 2a. Trigger check with PERIOUD(this important cuz this part dont work in my trigger) is building of owner of beacon in region 2b. If yes then it check it again after w8 some time 2c. if not then beacon automatically change owner to new player who tryed recapturing beacon
In your suggest trigger dont check with time condtions are complete or not
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
There is a trigger for capturing points with buidings, its work almost right, only bug its when you trying recapture point when already enemy have buidings in range. Then u need first clear area and ONLY then build your building, else if u build ur building before killing enemy point dont be captured and u will need add 1 more building there
@Form01: Go
Firstly, create a region named Resource #05 and attach it to your Resource #05 unit. This make it easier to work with in the editor, and is what you're telling the editor to create anyway. Took out the leaving event, as it's basically worthless. The leaving unit cannot be within the range of the Resource and be leaving at the same time, so the trigger would never run when a unit leaves the area.
There's no reason to have a while loop in there.
I already have point #5 attachedto unit resource #5, so u sure need region when I use function "convert circle in region"?, when I set region as point #5 with range 5.0?
And I need a bit more. Trigger must check not only enemyes in area but also neutral human players and allyes, so if u already capture point no one,even ally, cant recapture it without killing ur buildings in region.
So can I use "Any exclude self" instead "Enemy"?
I need trigger which must check:
Building appear in region(builded there or moved in), then: 1. If there no any another building in region, beacon captured 2. If there already any building that controlled by not this player then: 2a. Trigger check with PERIOUD(this important cuz this part dont work in my trigger) is building of owner of beacon in region 2b. If yes then it check it again after w8 some time 2c. if not then beacon automatically change owner to new player who tryed recapturing beacon
In your suggest trigger dont check with time condtions are complete or not