Many sc2 functions seem to be bugged...

Frozenwind

System maker
Reaction score
99
I see a lot of functions which simply don't work.

How would a "pick every unit in unitgroup" create an infinite loop, whereas a "for each unit in unitgroup" doesn't?

Why a marine, who is attacking me because of aggro,'s owner isn't marked as an enemy of mine? They don't store alliance in "check alliance aspect" function as it seems... (Doing it manually now as I simply need it for triggered spells). This may be caused because I change alliance through triggers (yet it IS a bug).

Dialogs, there are multiple items you can add, but things like a slider or an edit box won't appear on creation - seems like they aren't truly added yet.

Does someone else experience things like this?
 

Arkless

New Member
Reaction score
31
I see a lot of functions which simply don't work.

How would a "pick every unit in unitgroup" create an infinite loop, whereas a "for each unit in unitgroup" doesn't?

Why a marine, who is attacking me because of aggro,'s owner isn't marked as an enemy of mine? They don't store alliance in "check alliance aspect" function as it seems... (Doing it manually now as I simply need it for triggered spells). This may be caused because I change alliance through triggers (yet it IS a bug).

Dialogs, there are multiple items you can add, but things like a slider or an edit box won't appear on creation - seems like they aren't truly added yet.

Does someone else experience things like this?
I've already used "pick every unit in unitgroup" without any problems...

Is the marine neutral and attacks because you attacked it first (or a behaviour or anything like that)? Attacking does not equal being an enemy.

I never used sliders, but i already saw em in use. Edit boxes... I dont know^^
 

Frozenwind

System maker
Reaction score
99
I'm rather sure he's an enemy according to this function:

Code:
testing
    Events
        UI - Player Any Player presses Space key Down with shift Allow, control Allow, alt Allow
    Local Variables
    Conditions
    Actions
        Unit Group - Add HunterBasic [124.45, 177.68] to PotentionalPushingTargets ///test unit target
        Unit Group - Add SurvivorBasic [118.96, 166.62] to PotentionalPushingTargets ///test unit caster
        Player - Make player 1 and player 2 treat each other as Enemy ///hunter = 2, survivor = 1
        Player Group - Add player 1 to EnemiesOfPlayer[(2 - 1)] ///used for my custom system to check alliance
        Player Group - Add player 2 to EnemiesOfPlayer[(1 - 1)] ///same
        Variable - Set PlayerUnit[0] = SurvivorBasic [118.96, 166.62] ///used in some triggers
        UI - Display (Text((Triggering player))) for (All players) to Chat area ///so I know who activates it
        Region - Set the playable map area to (Entire map) ///I change play. map area in some other triggers

And the pick every unit results in an infinite loop for me (iteration found).
 

Frozenwind

System maker
Reaction score
99
Unitgroup not working (iteration detected = endless loop):
http://www.thehelper.net/forums/showthread.php?t=154251

Ally/Enemy check not working:
Code:
Push movement
    Events
        Timer - Every 0.04 seconds of Game Time
    Local Variables
        Speed = 0.0 <Real>
        temp_Unit = No Unit <Unit>
        ------- Speed = Grids / Second
    Conditions
    Actions
        ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        ------- SurvivorBasic
        ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        Variable - Set Speed = 14.0
        Unit Group - For each unit TempPBullet in PushingBullets[0] do (Actions)
            Actions
                Unit - Move TempPBullet instantly to ((Position of TempPBullet) offset by (Speed * 0.04) towards (Facing of TempPBullet) degrees) (Blend)
                Unit Group - For each unit temp_Unit in PotentionalPushingTargets do (Actions)
                    Actions
                        UI - Display "unit found" for (All players) to Subtitle area
                        General - If (Conditions) then do (Actions) else do (Actions)
                            If
                                And
                                    Conditions
                                        [COLOR="Red"]((Owner of temp_Unit) is in (Enemies of player (Owner of TempPBullet))) == true[/COLOR]
                                        TempPBullet != temp_Unit
                                        (Distance between (Position of temp_Unit) and (Position of TempPBullet)) <= 0.6
                            Then
                                Unit - Order temp_Unit to ( Stop) (Replace Existing Orders)
                                Unit - Make temp_Unit Uncommandable ///not sure whether this will actually prevent massclicking to escape the pushing bullet - still gotta test
                                UI - Display "unit pushed" for (All players) to Subtitle area
                                Unit - Move temp_Unit instantly to ((Position of temp_Unit) offset by (Speed * 0.04) towards (Facing of TempPBullet) degrees) (Blend)
                                Unit - Make temp_Unit Commandable
                            Else
                UI - Display "-----" for (All players) to Subtitle area
Works if red function is removed (yet it affects allies too in that situation)


Please note:
I solved both problems by using different functions (or in the alliance system, a custom function written by myself).
 

Severon

New Member
Reaction score
7
Code:
testing
    Events
        UI - Player Any Player presses Space key Down with shift Allow, control Allow, alt Allow
    Local Variables
    Conditions
    Actions
        Unit Group - Add HunterBasic [124.45, 177.68] to PotentionalPushingTargets ///test unit target
        Unit Group - Add SurvivorBasic [118.96, 166.62] to PotentionalPushingTargets ///test unit caster
        Player - Make player 1 and player 2 treat each other as Enemy ///hunter = 2, survivor = 1
        Player Group - Add player 1 to EnemiesOfPlayer[(2 - 1)] ///used for my custom system to check alliance
        Player Group - Add player 2 to EnemiesOfPlayer[(1 - 1)] ///same
        Variable - Set PlayerUnit[0] = SurvivorBasic [118.96, 166.62] ///used in some triggers
        UI - Display (Text((Triggering player))) for (All players) to Chat area ///so I know who activates it
        Region – Set the playable map area to (Entire map) ///I change play. Map area in some other triggers

Where does the marine come into play? Is he a fellow survivor, your survivor, the hunter? This function tells me that your making player 1 enemies with player 2. So if player 2 is the marine then he should attack you. If the marine is another survivor then his alliance isn’t set here. One more question EnemiesOfPlayer[(2-1)] why not just put EnemiesOfPlayer[(1)]? Unless this is a dual array in which case shouldn’t it be EnemiesOfPlayer[(2)][(1)]?( I haven’t used these yet in SC2 so I’m not real sure about this.

Code:
Push movement
    Events
        Timer - Every 0.04 seconds of Game Time
    Local Variables
        Speed = 0.0 <Real>
        temp_Unit = No Unit <Unit>
        ------- Speed = Grids / Second
    Conditions
    Actions
        ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        ------- SurvivorBasic
        ------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        Variable - Set Speed = 14.0
        Unit Group - For each unit TempPBullet in PushingBullets[0] do (Actions)
            Actions
                Unit - Move TempPBullet instantly to ((Position of TempPBullet) offset by (Speed * 0.04) towards (Facing of TempPBullet) degrees) (Blend)
                Unit Group - For each unit temp_Unit in PotentionalPushingTargets do (Actions)
                    Actions
                        UI - Display "unit found" for (All players) to Subtitle area
                        General - If (Conditions) then do (Actions) else do (Actions)
                            If
                                And
                                    Conditions
                                        ((Owner of temp_Unit) is in (Enemies of player (Owner of TempPBullet))) == true
                                        TempPBullet != temp_Unit
                                        (Distance between (Position of temp_Unit) and (Position of TempPBullet)) <= 0.6
                            Then
                                Unit - Order temp_Unit to ( Stop) (Replace Existing Orders)
                                Unit - Make temp_Unit Uncommandable
                                UI - Display "unit pushed" for (All players) to Subtitle area
                                Unit - Add 1 Reaper - Reaper Jump to temp_Unit from TempPBullet
                                Unit - Move temp_Unit instantly to ((Position of temp_Unit) offset by (Speed * 0.04) towards (Facing of TempPBullet) degrees) (Blend)
                                Unit - Make temp_Unit Commandable
                            Else
                UI - Display “-----“ for (All players) to Subtitle area
As for your iteration error, once again I’m not for sure, but I have an idea. In

Code:
    Conditions
                                        ((Owner of temp_Unit) is in (Enemies of player (Owner of TempPBullet))) == true
                                        TempPBullet != temp_Unit
“TempPBullet” is a unit type according to “TempPBullet != temp_Unit”
So in the alliance check condition it at some point is getting Owner of temp_unit(TempPBullet)” is in (Enemies of player (Owner of TempPBullet)))== true

In other words its getting Owner of TempPBullet is Enemy of Owner of TempPBullet. A player cannot be an enemy of themselves, so this might be where the error is coming from.

Hope this helps.

EDIT: Oops didn't see your edit, glad you fixed it, though kinda wonder if I'm right with the iteration part
 

Frozenwind

System maker
Reaction score
99
Code:
testing

Where does the marine come into play? It is the hunter which is a preset unit for my test (owned by player 2)
Is he a fellow survivor, your survivor, the hunter? This function tells me that your making player 1 enemies with player 2. So if player 2 is the marine then he should attack you. If the marine is another survivor then his alliance isn’t set here. I can ensure you the alliance changes by this function One more question EnemiesOfPlayer[(2-1)] why not just put EnemiesOfPlayer[(1)]? Unless this is a dual array in which case shouldn’t it be EnemiesOfPlayer[(2)][(1)]?( I haven’t used these yet in SC2 so I’m not real sure about this. I copied it from a different trigger which was like "owner of unit -1 (array 0~9, instead of 1~10, as the player numbers are). So basically I was too lazy to remove the arithematic xD Dual arrays work perfectly btw, I use them a lot.

Code:
Push movement
Code:
Conditions
                                        ((Owner of temp_Unit) is in (Enemies of player (Owner of TempPBullet))) == true
                                        TempPBullet != temp_Unit
“TempPBullet” is a unit type according to “TempPBullet != temp_Unit”
So in the alliance check condition it at some point is getting Owner of temp_unit(TempPBullet)” is in (Enemies of player (Owner of TempPBullet)))== true

In other words its getting Owner of TempPBullet is Enemy of Owner of TempPBullet. A player cannot be an enemy of themselves, so this might be where the error is coming from. Gonna test whether you are right.

Hope this helps.

EDIT: Oops didn't see your edit, glad you fixed it, though kinda wonder if I'm right with the iteration part

Read inside quote (green)


EDIT:
As promised, checked it for you.
This causes an iteration too (without the condition you though it was caused by:)
Code:
                Unit Group - Pick each unit in PotentionalPushingTargets and do (Actions)
                    Actions
                        UI - Display "unit found" for (All players) to Subtitle area
                        General - If (Conditions) then do (Actions) else do (Actions)
                            If
                                And
                                    Conditions
                                        TempPBullet != (Picked unit)
                                        (Distance between (Position of (Picked unit)) and (Position of TempPBullet)) <= 0.6
                            Then
                                UI - Display "unit pushed" for (All players) to Subtitle area
                                Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by (Speed * 0.04) towards (Facing of TempPBullet) degrees) (Blend)
                            Else
NOTE: This is the same loop as before, and thus only a part of the trigger.

So as you most-likely will agree with me now... Logically, an iteration can't be there o.o
 

Severon

New Member
Reaction score
7
Lol I supose I have to...logically:p Wish I knew the problem though, that kinda bugs me. Atleast you have a working "work-around". Well good luck with your map wish ya well
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • WildTurkey WildTurkey:
    is there a stephen green in the house?
    +1
  • The Helper The Helper:
    What is up WildTurkey?
  • The Helper The Helper:
    Looks like Google fixed whatever mistake that made the recipes on the site go crazy and we are no longer trending towards a recipe site lol - I don't care though because it motivated me to spend alot of time on the site improving it and at least now the content people are looking at is not stupid and embarrassing like it was when I first got back into this like 5 years ago.
  • The Helper The Helper:
    Plus - I have a pretty bad ass recipe collection now! That section of the site is 10 thousand times better than it was before
  • The Helper The Helper:
    We now have a web designer at my job. A legit talented professional! I am going to get him to redesign the site theme. It is time.
  • Varine Varine:
    I got one more day of community service and then I'm free from this nonsense! I polished a cop car today for a funeral or something I guess
  • Varine Varine:
    They also were digging threw old shit at the sheriff's office and I tried to get them to give me the old electronic stuff, but they said no. They can't give it to people because they might use it to impersonate a cop or break into their network or some shit? idk but it was a shame to see them take a whole bunch of radios and shit to get shredded and landfilled
  • The Helper The Helper:
    whatever at least you are free
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top