Region triggers

DonMushroom

Member
Reaction score
4
I have a trigger that shares vision if a hero dies. Cant seem to get it to work with the all points held shared vision.

Events
Unit - Any Unit dies
Local Variables
Rev = 0 <Integer>
Conditions
((Unit type of (Triggering unit)) is Hero) == True
(Player j is giving player i Shared Vision) == False
Actions
UI - Display "You have been revealed" for (Player group((Triggering player))) to Error area
General - For each integer Rev from 1 to 10 with increment 1, do (Actions)
Actions
Player - Turn player (Triggering player) Shared Vision On towards player Rev

How would i edit the conditions so when the hold all points shared vision is on the hero dieing reliever does not work/show? :)

So if shared vision (from all points being held) is on. Hero dieing/ being revived has no effect on shared vision.
If shared vision (from all points being held) is off. Hero dieing being revived works/shows.
 

DonMushroom

Member
Reaction score
4
The unit leaves region / unit dies works perfectly for the the loses region trigger in the editor test.

As soon as its published i get a trigger error saying "Execution took to long". It comes up whenever a unit leaves a region and when a unit dies :p

Im not sure why this is happening :(

Does anyone know of a condition that would stop this activating if tit does not need to. :) (When shared vision is not on)

So if all the regions are not held by a team it does not check if they have left or have died in a region (as there is no reason to) :)
 

Dave312

Censored for your safe viewing
Reaction score
269
That is rather weird. Do a single player map test (via the Test Document function in the editor), type TrigDebug into the Chat to open up the Trigger Debugger (you have to be in Windowed screen mode, not Fullscreen), go across to the Triggers tab, and what is the Average Run Time (ms) and Average Fail Time (ms) values?

I can probably come up with another method which will decrease the amount of time it takes for the trigger to run but it will be more complicated. I'll post back when I have finished a test map for it.
 

DonMushroom

Member
Reaction score
4
Loses Region - Both are 0 000

The main problem i am having is when the team gets shared vision. The gains region trigger does the too long thing every time a unit enters a region :p

As soon as a too long error comes up the game has chronic lag from then on.
 

MissKerrigan

Active Member
Reaction score
23
Think I might have a solution for your problem Mushroom:

First create 4 unit groups which called 'revealer 1', 'revealer 2', 'revealer 3' and 'revealer 4'


Now create the next 3 triggers:

1. when a unit enters the region of 'revealer 1' add unit to unit group 'revealer 1' (do this with all 4 'revealers')

2. if a unit leaves region, then remove the unit from the current unit group it was in (if a unit dies, it doesn't count as 'unit leaves region')

3. hide 'revealer' when the number of living units in unit group is '0' (create this in condition)


I apologize if I am this wrong, but I just try to find a way to help you Mushroom, hope this works!

MissKerrigan
 

Dave312

Censored for your safe viewing
Reaction score
269
In trying to create another set of triggers to get this working, I came across the "Execution took to long" error. I did some research into the error and found that if you place a wait action inside a loop, it resolves the problem. So try adding a wait action (set the duration to 0.0625s such that you don't notice the wait) into the "Gains Region" trigger inside the first "For each player" loop:

Trigger:
  • Gains Region
    • Events
      • Unit - Any Unit Enters Region 001
      • Unit - Any Unit Enters Region 002
    • Local Variables
      • i = 0 &lt;Integer&gt;
      • j = 0 &lt;Integer&gt;
    • Conditions
    • Actions
      • General - If (Conditions) then do (Actions) else do (Actions)
        • If
          • (Number of Living units in (Units in Region 001 having alliance Ally with player (Triggering player) matching Excluded: Missile, Dead, Hidden, with at most 1)) == 1
          • (Number of Living units in (Units in Region 002 having alliance Ally with player (Triggering player) matching Excluded: Missile, Dead, Hidden, with at most 1)) == 1
        • Then
          • Player Group - For each player j in (Enemies of player (Triggering player)) do (Actions)
            • Actions
              • General - Wait 0.0625 Game Time seconds
              • Player - Turn player j Shared Vision On towards player (Triggering player)
              • Player Group - For each player j in (Allies of player (Triggering player)) do (Actions)
                • Actions
                  • Player - Turn player j Shared Vision On towards player i
        • Else
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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 The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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