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.
  • 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 The Helper:
    Happy Thursday!
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top