• 0

    posted a message on Boss Trigger Question.

    @Nerfpl: Go

    Alright I fixed the Event. Barrage works now and the fact that its kinda in between 89 and 91% hp, Odin does it more than once (as long as he's in between that amount actually). Which gives a nice effect that I like.

    The SCV's spawn and I was able to find a way to only make 3 spawn for sure with a boolean. I still can't get the SCV's to go repair odin though. Here is the code. Any thoughts?

    Periodic Event
        Events
            Unit - Any Unit takes Fatal or Non-Fatal Any damage (from Any effects)
        Local Variables
        Conditions
            Game ON == true
        Actions
            Variable - Set Boss HP = (Boss Unit Life (Current))
            Variable - Set Boss HP Percent = (Boss Unit Life (Percent) (Current))
            ------- Boss Phases
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    89 <= Boss HP Percent <= 91
                Then
                    Unit - Make Boss Unit Deal Full damage
                    Unit - Order Boss Unit to (Odin - Barrage targeting relative points near (Center of Player Group)) (Replace Existing Orders)
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            SCV[0] == true
                        Then
                            Unit - Create 1 SCV for player 15 at (Player Spawn Point offset by (0.0, 0.0)) facing 270.0 degrees (No Options)
                            Unit Group - Add (Last created unit) to SCV Group
                            Unit - Create 1 SCV for player 15 at (Player Spawn Point offset by (1.0, 0.0)) facing 270.0 degrees (No Options)
                            Unit Group - Add (Last created unit) to SCV Group
                            Unit - Order (Last created unit) to (SCV - Repair targeting Boss Unit) (Replace Existing Orders)
                            Unit - Create 1 SCV for player 15 at (Player Spawn Point offset by (-1.0, 0.0)) facing 270.0 degrees (No Options)
                            Unit Group - Add (Last created unit) to SCV Group
                            Unit - Order (Last created unit) to (SCV - Repair targeting Boss Unit) (Replace Existing Orders)
                            Unit - Order all units in SCV Group to (SCV - Repair targeting Boss Unit) (Replace Existing Orders)
                            Variable - Set SCV[0] = false
                        Else
    
                    Trigger - Turn Boss Bombs Off
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Number of Living units in SCV Group) <= 0
                        Then
                            Trigger - Turn Boss Bombs On
                        Else
    
    Posted in: Triggers
  • 0

    posted a message on Boss Trigger Question.

    @Nerfpl: Go

    I got the percent working. I used within bounds. 89 <= Boss HP Percent <= 91

    I want only 3 scv's to be created and ordered to repair the boss. But. A lot are being created because the event is every .05 seconds and the boss stay's in between 89 and 91% for a while. I was thinking of using the number of living units in group to stop this but I'm not sure how to implement it.

    Periodic Event
        Events
            Timer - Every 0.05 seconds of Game Time
        Local Variables
        Conditions
            Game ON == true
        Actions
            Variable - Set Boss HP = (Boss Unit Life (Current))
            Variable - Set Boss HP Percent = (Boss Unit Life (Percent) (Current))
            ------- Boss Phases
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    89 <= Boss HP Percent <= 91
                Then
                    Unit - Make Boss Unit Deal Full damage
                    Unit - Order Boss Unit to (Odin - Barrage targeting relative points near (Center of Player Group)) (Replace Existing Orders)
                    General - Repeat (Actions) 3 times
                        Actions
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    (Number of Living units in SCV Group) <= 3
                                Then
                                    Unit - Create 1 SCV for player 15 at (Player Spawn Point offset by (0.0, 0.0)) facing 270.0 degrees (No Options)
                                    Unit Group - Add (Last created unit) to SCV Group
                                    Unit - Order (Last created unit) to (SCV - Repair targeting Boss Unit) (Replace Existing Orders)
                                Else
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            (Number of Living units in SCV Group) == 3
                                        Then
                                        Else
    
    Posted in: Triggers
  • 0

    posted a message on Triggering a single unit

    @DarlD: Go

    Okay. I got it sorta working. I used the condition within bounds and I used 88% and 92% and the boss shot the barrage at my units! Yay! i died!

    Unfortunately the scv's didn't spawn. How do I fix this?

    Periodic Event
        Events
            Timer - Every 0.05 seconds of Game Time
        Local Variables
        Conditions
            Game ON == true
        Actions
            Variable - Set Boss HP = (Boss Unit Life (Current))
            Variable - Set Boss HP Percent = (Boss Unit Life (Percent) (Current))
            ------- Boss Phases
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    88 <= Boss HP Percent <= 92
                Then
                    Unit - Order Boss Unit to (Odin - Barrage targeting relative points near (Center of Player Group)) (Replace Existing Orders)
                    General - Repeat (Actions) 3 times
                        Actions
                            Unit - Make Boss Unit Deal Full damage
                            Unit - Create 1 SCV for player 15 at (Player Spawn Point offset by (0.0, 0.0)) facing 270.0 degrees (No Options)
                            Unit Group - Add (Last created unit) to Boss Group
                            Unit - Order (Last created unit) to (SCV - Repair targeting Boss Unit) (Replace Existing Orders)
    
    Posted in: Triggers
  • 0

    posted a message on Triggering a single unit

    @Ahli634: Go

    I'm really un-familiar with functions and action definitions. I tried them out and I could not make them work properly.

    Posted in: Triggers
  • 0

    posted a message on Boss Trigger Question.

    @Yaos01: Go

    I completely agree that the variable is weird and I thought of using it that way too. But then it would be anywhere over or under 90% that it would use barrage. And I want it to be around 90% not 75 not 73 or 93 or 94. 90% . at 80% as well. and so on every 10%.

    For the unit scv. I did try to order the last created unit. The unit never gets created... Lol Kinda hard to order it around.

    Posted in: Triggers
  • 0

    posted a message on Triggering a single unit

    @Pshyched: Go

    Did that. Also din't work. every .05 game time seconds i would have an If then else run.

    (Basic version)

    if number of living units in unitgroup <= 0 (or 1 I'm not sure which value. Sometimes it doesn't work when I set it at 0.)

    then run player spawn.

    else (nothing)

    And In my player spawn I'd have my units created. 1 at a time with an off set on the point. and I'd have a turn off the current trigger.

    I suppose I could create a bool. Have it set to true once my units have been spawned and inclue that as a condition for player unit spawn.

    So if Units have Spawned == False

    Spawn units

    set variable to Units have Spawned == True

    That would work right?

    Posted in: Triggers
  • 0

    posted a message on Triggering a single unit

    @Chiquihuite: Go

    Actually both my technique and your technique doesn't work for what I want to do. Because both units can be in the same group and die at the same time thus triggering my trigger twice. Same thing applies to my interger calculation. I want a condition that would be like (Number of (triggering Unit) == 1.

    Does that exist? Or how may I go about creating that?

    Posted in: Triggers
  • 0

    posted a message on Boss Trigger Question.

    @DarlD: Go

    Yep I changed it to life percent current and it still doesn't work.

    Periodic Event
        Events
            Timer - Every 0.05 seconds of Game Time
        Local Variables
        Conditions
            Game ON == true
        Actions
            Variable - Set Boss HP = (Boss Unit Life (Current))
            Variable - Set Boss HP Percent = (Boss Unit Life (Percent) (Current))
            ------- Boss Phases
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Boss HP Percent == 90.0
                Then
                    Unit - Order Boss Unit to (Odin - Barrage targeting relative points near (Center of Player Group)) (Replace Existing Orders)
                    General - Repeat (Actions) 3 times
                        Actions
                            Unit - Make Boss Unit Deal Full damage
                            Unit - Create 1 SCV for player 15 at (Player Spawn Point offset by (0.0, 0.0)) facing 270.0 degrees (No Options)
                            Unit Group - Add (Last created unit) to Boss Group
                            Unit - Order (Unit (Number of Living units in Boss Group) from Boss Group) to (SCV - Repair targeting Boss Unit) (Replace Existing Orders)
    

    the boss doesn't use barrage on the general location of my units and no scv's spawn to repair odin....

    Posted in: Triggers
  • 0

    posted a message on Boss Trigger Question.

    @Pshyched: Go

    Yes but somehow it doesn't work when I tried using it. Same thing happened when I tried to just get the static HP. I had to tie it into a variable for it to work correctly.

    Posted in: Triggers
  • 0

    posted a message on Boss Trigger Question.

    @DarlD: Go

    Could anyone plz check out my coding?

    Variable - Set Boss HP = (Boss Unit Life (Current))
    Variable - Set Boss HP Percent = (Boss HP / (Boss Unit Maximum Life (Default)))
    Variable - Modify Boss HP Percent: * 100.0
    

    that will correctly calculate the HP percentage of my boss unit aye?

    Posted in: Triggers
  • 0

    posted a message on Boss Trigger Question.

    @DarlD: Go

    Well I got it working by setting the boss unit HP to a real variable and using that variable to trigger the events. The damage is being changed at the right time but the scv's are not spawning and I can't seam to be able to disable the damage on allies with the g-4 mines.

    I figured I'd do a little problem to get the percent of the current boss hp unit to calculate phases easier.

    Here's what I've got so far.

    Periodic Event
        Events
            Timer - Every 0.05 seconds of Game Time
        Local Variables
        Conditions
        Actions
            Variable - Set Boss HP = (Boss Unit Life (Current))
            Variable - Set Boss HP Percent = (Boss HP / (Boss Unit Maximum Life (Default)))
            Variable - Modify Boss HP Percent: * 100.0
            ------- Boss Phases
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    Boss HP Percent == 90.0
                Then
                    Unit - Order Boss Unit to (Odin - Barrage targeting relative points near (Center of Player Group)) (Replace Existing Orders)
                    General - Repeat (Actions) 3 times
                        Actions
                            Unit - Make Boss Unit Deal Full damage
                            Unit - Create 1 SCV for player 15 at (Player Spawn Point offset by (0.0, 0.0)) facing 270.0 degrees (No Options)
                            Unit Group - Add (Last created unit) to Boss Group
                            Unit - Order (Unit (Number of Living units in Boss Group) from Boss Group) to (SCV - Repair targeting Boss Unit) (Replace Existing Orders)
    
    Posted in: Triggers
  • 0

    posted a message on Boss Trigger Question.

    @Nerfpl: Go

    Okay. I got the Bombs working. I'm using the g-4 clusterbombs. I put the dmg at 20. and I got 24 to spawn randomly around the boss every 30 seconds a few times in a row with a 2 second game time delay. I like the effect and its a good alpha phase. Now I'm trying to change the attributes of my boss during the fight.

    At a certain number of hp I want the boss to deal more dmg. Attack faster. Use his abilites and have scv's spawn to repair the boss.

    here is what I've got so far on that one.

    Periodic Event
        Events
            Timer - Every 0.05 seconds of Game Time
        Local Variables
        Conditions
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Boss Unit Life (Current)) == 10000.0
                Then
                    General - Repeat (Actions) 3 times
                        Actions
                            Unit - Make Boss Unit Deal Full damage
                            Unit - Create 1 SCV for player 15 at (Boss Spawn Point offset by (0.0, 5.0)) facing 270.0 degrees (No Options)
                            Unit Group - Add (Last created unit) to Boss Group
                            Unit - Order (Last created unit) to (SCV - Repair targeting Boss Unit) (Replace Existing Orders)
                Else
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Boss Unit Life (Current)) == 8000.0
                        Then
                            General - Repeat (Actions) 3 times
                                Actions
                                    Unit - Create 1 SCV for player 15 at (Boss Spawn Point offset by (0.0, 5.0)) facing 270.0 degrees (No Options)
                                    Unit Group - Add (Last created unit) to Boss Group
                                    Unit - Order (Last created unit) to (SCV - Repair targeting Boss Unit) (Replace Existing Orders)
                        Else
                            General - If (Conditions) then do (Actions) else do (Actions)
                                If
                                    (Boss Unit Life (Current)) == 6000.0
                                Then
                                    General - Repeat (Actions) 3 times
                                        Actions
                                            Unit - Make Boss Unit Deal Mega damage
                                            Unit - Create 1 SCV for player 15 at (Boss Spawn Point offset by (0.0, 5.0)) facing 270.0 degrees (No Options)
                                            Unit Group - Add (Last created unit) to Boss Group
                                            Unit - Order (Last created unit) to (SCV - Repair targeting Boss Unit) (Replace Existing Orders)
                                Else
                                    General - If (Conditions) then do (Actions) else do (Actions)
                                        If
                                            (Boss Unit Life (Current)) == 4000.0
                                        Then
                                            General - Repeat (Actions) 3 times
                                                Actions
                                                    Unit - Create 1 SCV for player 15 at (Boss Spawn Point offset by (0.0, 5.0)) facing 270.0 degrees (No Options)
                                                    Unit - Create 1 SCV for player 15 at (Boss Spawn Point offset by (0.0, 4.0)) facing 270.0 degrees (No Options)
                                                    Unit Group - Add (Last created unit) to Boss Group
                                                    Unit - Order (Last created unit) to (SCV - Repair targeting Boss Unit) (Replace Existing Orders)
                                        Else
    
    Posted in: Triggers
  • 0

    posted a message on Triggering a single unit

    @DarlD: Go

    Nvm I got it. I made a unit Counter basically and I'm using that variables value to evaluate the number of units alive.

    Posted in: Triggers
  • 0

    posted a message on Triggering a single unit

    @Chiquihuite: Go

    Yes but this would only trigger on that single unit. So if it dies. My cinematic ends and my units spawn before the cinematic force is dead. I was to condition the last dying unit. is that at all possible?

    Posted in: Triggers
  • 0

    posted a message on Triggering a single unit

    @DarlD: Go

    Sorry I just realized I din't give my info on what I did. Sorry I'm super tired. Here is the script I've been working on. Sometimes two units die at the same time and it spawns my units twice. Anyone know of a way I could avoid this?

    Unit Dies
        Events
            Unit - Any Unit dies
        Local Variables
        Conditions
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    (Owner of (Triggering unit)) == 2
                Then
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Empty unit group) == Second Player Group
                            (Number of Living units in Second Player Group) <= 0
                        Then
                            Cinematics - Turn cinematic mode Off for (All players) over 0.0 seconds
                            Camera - Stop Following for player 1 Second Player Group with the camera and Clear Current Target
                            Camera - Pan the camera for player 1 to (Player Spawn Point offset by (0.0, 0.0)) over 0.0 seconds with 100% initial velocity, 4% deceleration, and Do Not use smart panning
                            Trigger - Run Player Spawn  (Check Conditions, Don't Wait until it finishes)
                        Else
                Else
    
    
    
    Cinematic Unit Counter
        Options: Event
        Return Type: Real
        Parameters
            Boss Spawn Point = (Boss Spawn Point offset by (0.0, 0.0)) <Point>
        Grammar Text: CUC()
        Hint Text: (None)
        Custom Script Code
        Local Variables
        Actions
            Variable - Set Cinematic Units count = (Cinematic Units count + 1)
            Unit - Return (Real(Cinematic Units count))
    
    Posted in: Triggers
  • To post a comment, please or register a new account.