How many actions can you run?

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
Have you been sitting at your computer and thinking how many actions you can run on a trigger before it just dumps the trigger. Well I have an answer for you, just DL this map and copy and paste the trigger from it to your map. It will give you a read out of how many actions your trigger can perform before the trigger is dropped.

The way this works is that it is a controled inf loop, controled meaning it wont crash your game. and as it goes thru the loops it sets how many loops it has done and displays them to you, so the last number will be your max actions. This is a bear bones map so you might get a lower amount in your map then you get in the one I am posting.
 

Attachments

  • Action Count.w3x
    16.2 KB · Views: 152

Exide

I am amazingly focused right now!
Reaction score
448
I'm too lazy to check myself: How many actions CAN a trigger run? :p
Also, please post the triggers you are using in the attached map. :)
 

Exide

I am amazingly focused right now!
Reaction score
448
I got 4545 to, when only showing the counter.
When I did this:
Code:
Actions
    For each (Integer Count[0]) from 1 to 3, do (Actions)
        Loop - Actions
            Set Count[1] = (Count[1] + 1)
            Set ug = (Units in (Playable map area))
            Custom script:   call DestroyGroup(udg_ug)
            Game - Display to (All players) the text: (String(Count[1]))
            Set Count[0] = 0
-I got about 2880.

Let's all try to make a trigger that returns exactly 1, shall we? :thup:
 

Flare

Stops copies me!
Reaction score
662
Let's all try to make a trigger that returns exactly 1, shall we?

Hmmm, by my calculations, you're going to need AT LEAST 14400 actions to do that (I don't know how BJ functions contribute, whether it would be +1 or +however many calls they have)

EDIT: Slightly more accurate script :D
JASS:
globals
    player p1 = Player (0)
    integer start = 0
    integer end = 23075
endglobals

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    loop
    exitwhen start == end
        set start = start + 1
    endloop
    call DisplayTextToPlayer (p1, 0, 0, I2S (start))
endfunction

//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Untitled_Trigger_001, 0.00 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction

Message is displayed up to end == 23075, but it stops at end == 23076 :p

(NOTE: Trigger doesn't execute anymore after first execution, even with a second event :()
 

Exide

I am amazingly focused right now!
Reaction score
448
Hmmm, by my calculations, you're going to need AT LEAST 14400 actions to do that (I don't know how BJ functions contribute, whether it would be +1 or +however many calls they have)

I tried to calculate it as well, but I failed miserably. :p
-Would a loop help us reach these 14400+ actions? :)
 

Jarko89

New Member
Reaction score
1
i put some footmen and added

Code:
Unit Group_ - Pick every unit in (Units in (Playable map area)) and do (Actions)
    Loop - Actions
        Unit_ - Move (Picked unit) instantly to (Random point in (Playable map area))
after 6 seconds, lag became so huge i coulnt even move the mouse. when it finished, i got 2400

PS: memory use had grown from 40k to 220k XD and nevertheless.... No crash :)
 

Exide

I am amazingly focused right now!
Reaction score
448
i put some footmen and added

Code:
Unit Group_ - Pick every unit in (Units in (Playable map area)) and do (Actions)
    Loop - Actions
        Unit_ - Move (Picked unit) instantly to (Random point in (Playable map area))
after 6 seconds, lag became so huge i coulnt even move the mouse. when it finished, i got 2400

PS: memory use had grown from 40k to 220k XD and nevertheless.... No crash :)

No wonder it lagged with that amount of leak. :p
Weird, though.. That you got 2400..
I got 1880-something with the same actions (but cleaning up the leaks). -So more actions but no leaks = smaller value.
 

SerraAvenger

Cuz I can
Reaction score
234
I got 4545 to, when only showing the counter.
When I did this:
Code:
Actions
    For each (Integer Count[0]) from 1 to 3, do (Actions)
        Loop - Actions
            Set Count[1] = (Count[1] + 1)
            Set ug = (Units in (Playable map area))
            Custom script:   call DestroyGroup(udg_ug)
            Game - Display to (All players) the text: (String(Count[1]))
            Set Count[0] = 0
-I got about 2880.

Let's all try to make a trigger that returns exactly 1, shall we? :thup:

Code:
Actions
    For each (Integer Count[0]) from 1 to 3, do (Actions)
        Loop - Actions
            Set Count[1] = (Count[1] + 1)
            Set ug = (Units in (Playable map area))
            Custom script:   call DestroyGroup(udg_ug)
            Game - Display to (All players) the text: (String(Count[0]))
            Set Count[0] = 0

Problem solved. Shows exactly 1.


EDIT:

JASS:
globals
    player p1 = Player (0)
    integer start = 0
    integer end = 23075
endglobals

function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    loop
    exitwhen start == end
        set start = start + 1
    endloop
    call DisplayTextToPlayer (p1, 0, 0, I2S (start))
endfunction
//===========================================================================
function InitTrig_Untitled_Trigger_001 takes nothing returns nothing
    set gg_trg_Untitled_Trigger_001 = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Untitled_Trigger_001, 0.00 )
    call TriggerAddAction( gg_trg_Untitled_Trigger_001, function Trig_Untitled_Trigger_001_Actions )
endfunction

(NOTE: Trigger doesn't execute anymore after first execution, even with a second event :()

Lol.
JASS:
function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
    set start = 0
    loop
    exitwhen start == end
        set start = start + 1
    endloop
    call DisplayTextToPlayer (p1, 0, 0, I2S (start))
endfunction

Tried that?
It will execute, but it will run into an inf loop.

exitwhen start == end


Now,
23076 is not 23075
nor are
23077, 23078, 23079, 23080, 23081, 23082, 23083 etc.
 

Gwypaas

hook DoNothing MakeGUIUsersCrash
Reaction score
50
The game can handle about 300,000 instructions to the Virtual Machine before you hit the op limit.
 
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