Does this boolean exist? If so, how can I use it in my map?

LoveTD's

New Member
Reaction score
34
If any unit from unit group is in region ... equal to true

Is it possible to do that? because the only thing I saw @ booleans is the boolean:

If ALL units from unit group are in region ... equal to true
 

ShadowInTheD

Active Member
Reaction score
12
I don't know, and I really don't want to check, but if it's not, you can easily do it by creating a loop and getting the positions of all the units in a unit group, and check if the points are in a region or within the range of a point.
 

LoveTD's

New Member
Reaction score
34
that's quite smart, I havent thought of that :p thank you. I will try it right away... if it works you will get +rep :D

1 problem though: I have no Idea how I would make a loop that checks the points of a unit ^^
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
set bool_group = units in <region> matching (matching unit is in <your_group>)
if number of units in bool_group greater than 0....
 

ShadowInTheD

Active Member
Reaction score
12
You just make a unit group, if you want, (it could be more complicated), or you can in some way manipulate it to be in an integer loop. But either way, you have to set a point to the position of each unit in the group, like TempPoint[integer+1] for each unit in the group. Then, to actually check it, do a loop, if then else, and do for each (number you started with) - number of units in group and then do if TempPoint is in region / within range of point then do your actions, if else, don't do your actions.

EDIT: Sorry, when you do the unit loop with TempPoint[integer +1], you have to set integer = to integer +1 as well.
 

LoveTD's

New Member
Reaction score
34
set bool_group = units in <region> matching (matching unit is in <your_group>)
if number of units in bool_group greater than 0....
<--- This solved my problem, thank you! <3

Nevermind, strange enough it didnt work, what I am trying to do is that whenever any unit from a unit group is in the same region as any unit from a different unit group a boolean has to turn on true...

so it should turn false when:
there's only 1 unit in the region
there are more units of the same group in the region
there is no unit in the region
there are not 2 (or more) units from different unit groups in the region
 

Dinowc

don't expect anything, prepare for everything
Reaction score
223
uhm that's a complicated one...
try this:

Code:
set group1 = units in <region> matching (matching unit is in <first_group>)
set group2 = units in <region> matching (matching unit is in <second_group>)

if then else
   if number of units in group1 equal to 1 and number of units in group2 equal to 1
     then
       ....do whatever actions
     else
 

LoveTD's

New Member
Reaction score
34
I already tryed that and it didnt work :S I'll post the triggers as soon as I get home, the thing is: I'm working on a king of the hill system and everything worked when it was a free-for-all game... the teamplay game however changed the triggers a bit which means it doesnt work for team 2 and pausing the timer while 2 different teams are in the same region also doesnt work :S
 

LoveTD's

New Member
Reaction score
34
Here are the triggers, as I said in the post above:

this one is the timer for the players in team 1:
Code:
Team 1 timer
    Events
        Time - Every 0.70 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in Raiders_Units and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (King of the hill <gen> contains (Picked unit)) Equal to False
                    Then - Actions
                        Countdown Timer - Pause King_timer[1]
                        Countdown Timer - Hide King_timer_window[1] for Player 1 (Red)
                        Countdown Timer - Hide King_timer_window[1] for Player 2 (Blue)
                        Countdown Timer - Hide King_timer_window[1] for Player 3 (Teal)
                        Countdown Timer - Hide King_timer_window[1] for Player 4 (Purple)
                        Countdown Timer - Hide King_timer_window[1] for Player 5 (Yellow)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Unit-type of (Picked unit)) Not equal to |cffFFCC00Space Orc Elite|r) and (((Unit-type of (Picked unit)) Not equal to |cffFFCC00Space Orc Pyromaniac|r) and (((Unit-type of (Picked unit)) Not equal to |cffFFCC00Space Orc Sniper|r) and ((Unit-type of (Picked unit)) Not equal to |cffFFCC00Space Orc Task Force|r)))
                            Then - Actions
                                Countdown Timer - Pause King_timer[1]
                                Countdown Timer - Hide King_timer_window[1] for Player 1 (Red)
                                Countdown Timer - Hide King_timer_window[1] for Player 2 (Blue)
                                Countdown Timer - Hide King_timer_window[1] for Player 3 (Teal)
                                Countdown Timer - Hide King_timer_window[1] for Player 4 (Purple)
                                Countdown Timer - Hide King_timer_window[1] for Player 5 (Yellow)
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        More_then_one_in_rect Equal to True
                                    Then - Actions
                                        Countdown Timer - Pause King_timer[1]
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                Has_already_been_in_region[1] Equal to True
                                            Then - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Timer_is_dead[1] Equal to False
                                                    Then - Actions
                                                        Countdown Timer - Resume King_timer[1]
                                                        Countdown Timer - Show King_timer_window[1] for Player 1 (Red)
                                                        Countdown Timer - Show King_timer_window[1] for Player 2 (Blue)
                                                        Countdown Timer - Show King_timer_window[1] for Player 3 (Teal)
                                                        Countdown Timer - Show King_timer_window[1] for Player 4 (Purple)
                                                        Countdown Timer - Show King_timer_window[1] for Player 5 (Yellow)
                                                    Else - Actions
                                                        Do nothing
                                            Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Timer_is_dead[1] Equal to False
                                                    Then - Actions
                                                        Countdown Timer - Start King_timer[1] as a One-shot timer that will expire in 60.00 seconds
                                                        Countdown Timer - Create a timer window for King_timer[1] with title King of the hill:
                                                        Set King_timer_window[1] = (Last created timer window)
                                                        Countdown Timer - Show King_timer_window[1] for Player 1 (Red)
                                                        Countdown Timer - Show King_timer_window[1] for Player 2 (Blue)
                                                        Countdown Timer - Show King_timer_window[1] for Player 3 (Teal)
                                                        Countdown Timer - Show King_timer_window[1] for Player 4 (Purple)
                                                        Countdown Timer - Show King_timer_window[1] for Player 5 (Yellow)
                                                        Countdown Timer - Hide King_timer_window[1] for Player 6 (Orange)
                                                        Countdown Timer - Hide King_timer_window[1] for Player 7 (Green)
                                                        Countdown Timer - Hide King_timer_window[1] for Player 8 (Pink)
                                                        Countdown Timer - Hide King_timer_window[1] for Player 9 (Gray)
                                                        Countdown Timer - Hide King_timer_window[1] for Player 10 (Light Blue)
                                                        Set Has_already_been_in_region[1] = True
                                                    Else - Actions
                                                        Do nothing

this one is the timer for the players in team 2:

Code:
Team 2 timer
    Events
        Time - Every 0.70 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in Stompeak_Units and do (Actions)
            Loop - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        ((Unit-type of (Picked unit)) Not equal to |cffFFCC00Space Orc Elite|r) and (((Unit-type of (Picked unit)) Not equal to |cffFFCC00Space Orc Pyromaniac|r) and (((Unit-type of (Picked unit)) Not equal to |cffFFCC00Space Orc Sniper|r) and ((Unit-type of (Picked unit)) Not equal to |cffFFCC00Space Orc Task Force|r)))
                    Then - Actions
                        Countdown Timer - Pause King_timer[2]
                        Countdown Timer - Hide King_timer_window[2] for Player 1 (Red)
                        Countdown Timer - Hide King_timer_window[2] for Player 2 (Blue)
                        Countdown Timer - Hide King_timer_window[2] for Player 3 (Teal)
                        Countdown Timer - Hide King_timer_window[2] for Player 4 (Purple)
                        Countdown Timer - Hide King_timer_window[2] for Player 5 (Yellow)
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                (King of the hill <gen> contains (Picked unit)) Equal to False
                            Then - Actions
                                Countdown Timer - Pause King_timer[2]
                                Countdown Timer - Hide King_timer_window[2] for Player 1 (Red)
                                Countdown Timer - Hide King_timer_window[2] for Player 2 (Blue)
                                Countdown Timer - Hide King_timer_window[2] for Player 3 (Teal)
                                Countdown Timer - Hide King_timer_window[2] for Player 4 (Purple)
                                Countdown Timer - Hide King_timer_window[2] for Player 5 (Yellow)
                            Else - Actions
                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    If - Conditions
                                        More_then_one_in_rect Equal to True
                                    Then - Actions
                                        Countdown Timer - Pause King_timer[2]
                                    Else - Actions
                                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                            If - Conditions
                                                Has_already_been_in_region[2] Equal to True
                                            Then - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Timer_is_dead[2] Equal to False
                                                    Then - Actions
                                                        Countdown Timer - Resume King_timer[2]
                                                        Countdown Timer - Show King_timer_window[2] for Player 6 (Orange)
                                                        Countdown Timer - Show King_timer_window[2] for Player 7 (Green)
                                                        Countdown Timer - Show King_timer_window[2] for Player 8 (Pink)
                                                        Countdown Timer - Show King_timer_window[2] for Player 9 (Gray)
                                                        Countdown Timer - Show King_timer_window[2] for Player 10 (Light Blue)
                                                    Else - Actions
                                                        Do nothing
                                            Else - Actions
                                                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                                    If - Conditions
                                                        Timer_is_dead[2] Equal to False
                                                    Then - Actions
                                                        Countdown Timer - Start King_timer[2] as a One-shot timer that will expire in 60.00 seconds
                                                        Countdown Timer - Create a timer window for King_timer[2] with title King of the hill:
                                                        Set King_timer_window[2] = (Last created timer window)
                                                        Countdown Timer - Hide King_timer_window[2] for Player 1 (Red)
                                                        Countdown Timer - Hide King_timer_window[2] for Player 2 (Blue)
                                                        Countdown Timer - Hide King_timer_window[2] for Player 3 (Teal)
                                                        Countdown Timer - Hide King_timer_window[2] for Player 4 (Purple)
                                                        Countdown Timer - Hide King_timer_window[2] for Player 5 (Yellow)
                                                        Countdown Timer - Show King_timer_window[2] for Player 6 (Orange)
                                                        Countdown Timer - Show King_timer_window[2] for Player 7 (Green)
                                                        Countdown Timer - Show King_timer_window[2] for Player 8 (Pink)
                                                        Countdown Timer - Show King_timer_window[2] for Player 9 (Gray)
                                                        Countdown Timer - Show King_timer_window[2] for Player 10 (Light Blue)
                                                        Set Has_already_been_in_region[2] = True
                                                    Else - Actions
                                                        Do nothing

This one is for checking if there are 2 units or more from different teams in the same region:

Code:
Check units in region
    Events
        Time - Every 0.10 seconds of game time
    Conditions
    Actions
        Set Raider_Units_Bool_group = (Units in King of the hill <gen> matching (((Matching unit) is in Raiders_Units) Equal to True))
        Set Stompeak_Units_Bool_group = (Units in King of the hill <gen> matching (((Matching unit) is in Stompeak_Units) Equal to True))
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Number of units in Raider_Units_Bool_group) Equal to 0) and ((Number of units in Stompeak_Units_Bool_group) Equal to 0)
            Then - Actions
                Set More_then_one_in_rect = False
            Else - Actions
                If (((Number of units in Stompeak_Units_Bool_group) Greater than or equal to 1) and ((Number of units in Raider_Units_Bool_group) Greater than or equal to 1)) then do (Set More_then_one_in_rect = True) else do (Do nothing)

This one is for that when team 1 wins the king of the hill:

Code:
Win for team 1
    Events
        Time - King_timer[1] expires
    Conditions
    Actions
        Set Timer_is_dead[1] = True
        Countdown Timer - Destroy King_timer_window[1]
        Game - Display to (All players) the text: (The Raiders +  Have won king of the hill!)
        Trigger - Turn off show all times <gen>

And this one is for team 2 to win:

Code:
Win for team 2
    Events
        Time - King_timer[2] expires
    Conditions
    Actions
        Set Timer_is_dead[2] = True
        Countdown Timer - Destroy King_timer_window[2]
        Game - Display to (All players) the text: (Stompeak +  Have won king of the hill!)
        Trigger - Turn off show all times <gen>

now these are the problems I have: team 1 timer works, but does not stop when a player of the other team is in the hill with a player of team 1.
Team 2 timer doesnt show which means: it does show the timer window with the title, but no timer in it. If I can fix these 2 things then these triggers should work.

Anyone who can find the solution to this will get +rep :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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!
    +1
  • 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
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      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