• 0

    posted a message on Engineer Capture ability

    Hoping you guys can come up with a solution to a problem I have been having. Probably been shooting out of my comfort zone with this one but I think you experts could solve it. I want to make a unit type like the engineer from old C&C games but with a difference. This is that any unit can use the capture building function with a button on the Abilities - command card +. When used within range of target it then sets a countdown timer to capturing the building.

    I have started in the data section with a

    Ability called Capture which is a effect target with a required target filter + structure. I have then created a button called capture and added it both to command card in marines unit tab and abilities.

    Now assuming this is enough, which I doubt knowing my luck. i should now be able to create a trigger that when capture button is pressed within range of structure should begin a capture countdown. This is where i get stuck. I take it the first bit will be,

    Capturing Events Unit - Any Unit Enters a distance of 1.0 from Sensor Tower [125.50, 131.50] Local Variables i = 0 <Integer>

    Could probably use an array for all my buildings but would first like to get one working. Next I would probably need a if/then/else condition that does something like this.

    Conditions Actions General - If (Conditions) then do (Actions) else do (Actions) If triggering unit uses ability in range of sensor tower Then Unit - Change ownership of Sensor Tower [125.50, 131.50] to triggering player and Change Color Else

    I also know that i need a countdown timer in there but i have really not worked with triggers let alone progressbars etc. I know my coding is poor but I have been learning over the last week so be gently with me.

    Posted in: Triggers
  • 0

    posted a message on HOW TO: Multiple region capture / capturing

    I was wondering if anyone would be able to help me get this trigger working? The two links provided are now inactive and Millenium7 also seems to be inactive. In my debugging window the only thing that gets an error is the conditions in the Capturecountdown second part. i'm trying to get this to work with two teams of four players. I have made each out post have an integre like this

    Variable - Set Outpost[1] = FlagPost [209.00, 131.00] Variable - Set Outpost[2] = FlagPost [123.00, 181.00] Variable - Set Outpost[3] = FlagPost [70.00, 140.00] Variable - Set Outpost[4] = FlagPost [131.00, 71.00] Variable - Set Outpost[5] = FlagPost [133.00, 128.00]

    Then i have added each player to teams this way.

    Player Group - Add player 1 to Team1 Player Group - Add player 2 to Team1 Player Group - Add player 3 to Team1 Player Group - Add player 4 to Team1 Player Group - Add player 5 to Team2 Player Group - Add player 6 to Team2 Player Group - Add player 7 to Team2 Player Group - Add player 8 to Team2

    Team1 and Team2 are Global Variables of the player Group variety. The problem I take it I am having is the lines that include SlotnumberA/1 are his own globals. So as a noob to this learning the editor I thought simplay changing it too.

    (Number of Living units in (Units in UnitsInCapRadius[i] having alliance Ally with (Player 1 from (Allies of player 1)), with at most Any Amount)) > 0 Unit - Change ownership of i2 to player 1 and Change Color

    Still getting debug errors in capture countdown.

    So any help will be appreciated and I am one of those ppl who have to keep going until the problem is solved :D

    Posted in: Tutorials
  • To post a comment, please or register a new account.