SC2Mapster Forums

Development > Triggers

Unit Suicide Fail

  • 12 posts
    #1 Nov 11, 2012 at 20:51 UTC - 0 likes

    I have a problem with the air units not attacking the nearest target when given the suicide command in the trigger action pic. Where the small circle is on the map picture is where the air units spawn and the red line is the path that those units fly down. Now the white line is the path to the nearest target and yet the air units dont fly over there and attack it.

    Last edited Nov 11, 2012 by SolidSC: missed a word
    • action.png
    • Terrain_003.jpg
    #2 Nov 12, 2012 at 15:35 UTC - 0 likes

    Well I solved the problem with the air units not attacking the nearest possible target from their spawn point with the enable suicide for idle units. To solve this was have a point location for the air units to attack.

    http://www.sc2mapster.com/media/attachments/32/956/idle.png

    Now the air units fly over there in attack move. But when the desired target point was reach the air units became idle while enemy units still remain.

    http://www.sc2mapster.com/media/attachments/32/958/Screenshot20.jpg

    Another trigger was needed and not the enable suicide for idle unit it has no effect on this new problem with the idle air units. I found this trigger on the forums and it works.

    http://www.sc2mapster.com/media/attachments/32/957/seek.png

    Last edited Nov 12, 2012 by SolidSC
    • idle.png
    • seek.png
    • Screenshot20.jpg
    #3 Nov 12, 2012 at 17:57 UTC - 0 likes

    You may wish to add conditions to the trigger that causes idle units to search and destroy.

    My Projects:
    Malum Ruina: SC2Mapster
    Eternal Exile: SC2Mapster
    Spine Crawler Madness: SC2Mapster
    Xeno Crisis: SC2Mapster

    #4 Nov 13, 2012 at 17:14 UTC - 0 likes

    Well I noticed that the broodling were attacking the air units. I deleted the trigger and the broodling never targeted the enemy air units after that.

    http://www.sc2mapster.com/media/attachments/32/994/brood.png

    Last edited Nov 13, 2012 by SolidSC
    • brood.png
    #5 Nov 13, 2012 at 20:34 UTC - 0 likes

    @BasharTeg: Go

    How can you add a condition where the trigger is not applied to broodlings. Somehow the trigger overrides the broodling tagetfilters and enables them to attack my air units.

    #6 Nov 13, 2012 at 21:09 UTC - 0 likes

    Well mostly likely your Data is a mess with broodlords. Other option is to add in a trigger which gets Idle units for orders IF condition if Broodlord THEN attack only ground units, search for them.. ELSE attack any unit they can find.

    Edit: IF Broodlord OR Broodling THEN...

    Last edited Nov 13, 2012 by TwoDie

    http://img27.imageshack.us/img27/8882/abasizedr.jpg

    #7 Nov 13, 2012 at 22:13 UTC - 0 likes

    @TwoDie: Go

    Everything is ok with the broodlord data. Both the broodlord and broodling are trying to attack my air units. The trigger is the culprit. When the zerg air units spawn and are given the attack point to go to the broodlords are ok and seek out ground targets but when the broodlords fly over that attack point they become idle and that when the problem trigger kicks in and the broodlords start attacking my air units. This is the trigger that is giving me problems with the broodlords. So I should make the trigger to target broodlords and have them seek out ground units while the rest target what ever units they can.

    http://www.sc2mapster.com/media/attachments/33/2/problem_trigger.png

    Last edited Nov 13, 2012 by SolidSC
    • problem_trigger.png
    #8 Nov 14, 2012 at 07:10 UTC - 0 likes

    Heh seems like you just cant do it without writting for you a Trigger script :/

    Untitled Trigger 003
        Events
            Unit - Any Unit Becomes idle
        Local Variables
        Conditions
            (Owner of (Triggering unit)) == 2
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Or
                        Conditions
                            (Unit type of (Triggering unit)) == Brood Lord
                            (Unit type of (Triggering unit)) == Brood Lord - Broodling
                            (Unit type of (Triggering unit)) == Broodling - (Escort)
                Then
                    Unit - Order (Triggering unit) to ( Attack targeting (Position of (Closest unit to (Position of (Triggering unit)) in (Units in (Entire map) having alliance Enemy with player (Owner of (Triggering unit)) matching Required: Ground; Excluded: Missile, Dead, Hidden, with at most Any Amount)) (Replace Existing Orders)
                Else
                    Unit - Order (Triggering unit) to ( Attack targeting (Position of (Closest unit to (Position of (Triggering unit)) in (Units in (Entire map) having alliance Enemy with player (Owner of (Triggering unit)) matching Excluded: Missile, Dead, Hidden, with at most Any Amount)))) (Replace Existing Orders)
    
    Last edited Nov 14, 2012 by TwoDie
    #9 Nov 14, 2012 at 18:50 UTC - 0 likes

    @TwoDie: Go Thanks that solved the problem. I had to add zerglings and the other ground attack only units to the list. I did this when I notice a zergling was following one of my carriers.

    #10 Nov 14, 2012 at 19:50 UTC - 0 likes
    Quote from SolidSC: Go

    @TwoDie: Go Thanks that solved the problem. I had to add zerglings and the other ground attack only units to the list. I did this when I notice a zergling was following one of my carriers.

    The reason is because they are attacking the unit's point (or Attack-Moving to the position of the unit), not the unit itself. You would have to change the order to Order Targeting Unit to get them to target a specific unit. But creating a distinction like what TwoDie suggested should suffice for a simple "suicide" simulation.

    #11 Nov 14, 2012 at 20:48 UTC - 0 likes

    @BasharTeg: Go

    If they would get order to find any Unit Including buildings then when targeting building they will ignore when being attacked by defenders and die by not responding for taking damage.

    #12 Nov 14, 2012 at 21:09 UTC - 0 likes
    Quote from TwoDie: Go

    @BasharTeg: Go

    If they would get order to find any Unit Including buildings then when targeting building they will ignore when being attacked by defenders and die by not responding for taking damage.

    That's true, unless a trigger or behavior has them retarget. It would take a more complex trigger to assign priority to certain target types based on the attacking unit.

  • 12 posts

You must login to post a comment. Don't have an account? Register to get one!