question about: run trigger

mapguy

New Member
Reaction score
46
in my map I have a huge damage detection trigger that checks lots of buffs, condition, absorbs damage, increse resist,.

in a few words, all skills related with damage are inside this trigger.

whe I open this trigger it takes 2 seconds to open, and Im starting to think that I only have 4 heroes yet, and in future it will take like 10 secs to open.

my qustion is:

can I use
Trigger:
  • run trigger (ignoring conditions)

to split my huge trigger in a lot of small ones?

question 2, all units named as triggering unit in the first trigger will also be the triggering unit in the last trigger of my trigger sequence?
Because Im afraid that if I split my triggers it won't work if two units takes damage at the same time.:(

question 3: the new trigger runs when all events of the first trigger ends or in the EXACT moment it is ordered to run ?

example:

trigger 1 starts running
trigger 1 orders trigger 2 to run
trigger 2 starts running
trigger 2 orders trigger 3 to run
trigger 3 starts running
trigger 3 finishes running
trigger 2 finishes running
trigger 1 finishes running

problem solved, I did this:
I place 1 footman, 1 knight, 1 priest in the same place, and then:

Trigger:
  • testando
    • Events
      • Time - Elapsed game time is 3.00 seconds
    • Conditions
    • Actions
      • Unit - Cause Footman 0000 <gen> to damage circular area after 0.00 seconds of radius 500.00 at (Center of (Playable map area)), dealing 1000000000.00 damage of attack type Spells and damage type Normal


Trigger:
  • tsting
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set x = (Triggering unit)
      • Game - Display to (All players) the text: (Name of (Triggering unit))
      • Trigger - Run testingo <gen> (ignoring conditions)


Trigger:
  • testingo
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Name of (Triggering unit))
      • Game - Display to (All players) the text: (Name of x)


when My units were killed I received my messages in this sequence:

priest
priest
priest
footman
footman
footman
knight
knight
knight

it means that when I run trigger that trigger runs in the middle of my trigger.
 

Ayanami

칼리
Reaction score
288
I think if you use the "Run Trigger" action, it won't recognize any "Triggering unit".
 

OneBadPsycho

10100111001
Reaction score
93
It looks like "Triggering Unit" persists through the different triggers. A small test can show it:

Trigger:
  • Noob Test
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (Name of (Triggering unit))
      • Trigger - Run Noob Test Execute <gen> (ignoring conditions)


Trigger:
  • Noob Test Execute
    • Events
    • Conditions
    • Actions
      • Custom script: if GetTriggerUnit() == null then
      • Game - Display to (All players) the text: No unit!
      • Custom script: else
      • Game - Display to (All players) the text: (Name of (Triggering unit))
      • Custom script: endif


When I kill my footman ingame it displays this:

view


1. So yes, you will be able to split up your trigger.

2. Meh... See above.

3. They are run in order. Imagine if you had some if/then/else statements to run certain functions when the right conditions are met and you would see that they are not run at once.

Trigger:
  • Noob Test 2
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Footman
        • Then - Actions
          • Trigger - Run Noob Test 2 Execute 1 <gen> (ignoring conditions)
        • Else - Actions
          • Trigger - Run Noob Test 2 Execute 2 <gen> (ignoring conditions)


Trigger:
  • Noob Test 2 Execute 1
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Run!


Trigger:
  • Noob Test 2 Execute 2
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: Not Run!


As expected:

view


EDIT:

A better example of question 3:

Trigger:
  • Noob Test 3
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Trigger - Run Noob Test 3 Execute 1 <gen> (ignoring conditions)
      • Trigger - Run Noob Test 3 Execute 2 <gen> (ignoring conditions)
      • Wait 2.00 seconds


Trigger:
  • Noob Test 3 Execute 1
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: 1


Trigger:
  • Noob Test 3 Execute 2
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: 2


The numbers show exactly after the unit is dead, and not after 2 seconds!
 

mapguy

New Member
Reaction score
46
It looks like "Triggering Unit" persists through the different triggers. A small test can show it:

thanks for answer 1 and 2, but I think I didn't exaplined well my 3rd question.

this is about if the trigger stops running until the last finishes.
 

OneBadPsycho

10100111001
Reaction score
93
thanks for answer 1 and 2, but I think I didn't exaplined well my 3rd question.

this is about if the trigger stops running until the last finishes.

Ye I noticed that after. I am not quite sure how to test that. This could probably show it:

Trigger:
  • Noob Test 4
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set IsRunning = True
      • Trigger - Run Noob Test 4 Execute 1 <gen> (ignoring conditions)
      • Set IsRunning = False


Trigger:
  • Noob Test 4 Execute 1
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • IsRunning Equal to True
        • Then - Actions
          • Game - Display to (All players) the text: Trigger: Noob Test ...
        • Else - Actions
          • Game - Display to (All players) the text: Trigger: Noob Test ...
      • Game - Display to (All players) the text: Trigger: Noob Test ...


Result:

view


This result could be caused by the fast action calls, so I added a loop to test it:

Trigger:
  • Noob Test 4 Execute 1
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 5000, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • IsRunning Equal to True
            • Then - Actions
              • Game - Display to (All players) the text: Trigger: Noob Test ...
            • Else - Actions
              • Game - Display to (All players) the text: Trigger: Noob Test ...
      • Game - Display to (All players) the text: Trigger: Noob Test ...


I got the exact same result (x5000); the first trigger was still running, which means it waits for the called trigger to finish.
 

mapguy

New Member
Reaction score
46
I got the exact same result (x5000); the first trigger was still running, which means it waits for the called trigger to finish.

In other words, It dont but if the trigger runs with lots of units in the same time.

thanks.

I hope It works, It would be good to split my 700lines trigger into 10 of 70 lines.
 

OneBadPsycho

10100111001
Reaction score
93
In other words, It dont but if the trigger runs with lots of units in the same time.

thanks.

I hope It works, It would be good to split my 700lines trigger into 10 of 70 lines.

Why wouldn't it ?

I got the exact same result (x5000); the first trigger was still running, which means it waits for the called trigger to finish.
I forgot to mention that this is obviously without waits.
 

Bogrim

y hello thar
Reaction score
154
Yes, triggering unit persists in triggers run with an action. That's not the reason for the lag though, this is:
in my map I have a huge damage detection trigger that checks lots of buffs, condition, absorbs damage, increse resist,
BJs lag a lot, especially the BJ that checks for buffs. If you run 3 triggers that check for a buff once every 0.01 seconds, you should notice how much the game slows down. Splitting the buff detection into a separate trigger and running it only whenever necessary will reduce the lag in your map.
 

mapguy

New Member
Reaction score
46
I do this. But I have to check for buffs when I do damage...
If I don't Ill have to fix a lot of things and turn on and off some conditions (what a head ache)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/
  • The Helper The Helper:
    Here is another comfort food favorite - Million Dollar Casserole - https://www.thehelper.net/threads/recipe-million-dollar-casserole.193614/

      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