Very strange trigger problem? Expiring trigger?

WankerOne

New Member
Reaction score
0
Guys,

I have some sort of wierd phenomana going on with a trigger here.
There is no need to look to deeply into my trigger other then a couple things.

This trigger has 2 FOR loops in it... one with integer A and one with Integer B

IF you look at my trigger, it creates floating text at middle of the 500 loop, after the 24 loop.

So if I ran this trigger, I should get 500 different outputs on the screen

The code in the 24 loop computes alot of SIN and COS floating point calculations, so it is somewhat math intensive.


Whenver I run this code I dont get 500 outputs.....I only get like 60.....
If I change the 24 loop to 12 I get more outputs...If I raise the 24 loop to 50 or so....I get less outputs like 20.....

Basically.....Its like the trigger times out after awhile??? Can a trigger only run for a givin period of time before it expires?
 

seph ir oth

Mod'n Dat News Jon
Reaction score
262
Maybe the trigger runs too fast for you, and ends before you know it.

Might have to put in waits inbetween certain actions.

Post the trigger please.
 
W

WankerMan

Guest
Here is my trigger......
sorry my i couldnt get my email to work on my other account
 

Attachments

  • trigger.JPG
    trigger.JPG
    143 KB · Views: 255

seph ir oth

Mod'n Dat News Jon
Reaction score
262
A very messy trigger!

Yeh, I'm sure that's all run at the same time really quickly. Does it make any text at all?
 
W

WankerMan

Guest
yes it makes text...but for some reason the amount of text i get is depends on how big the FOR 50 loop is...... which should have absolutley NOTHING to do with it.
 

seph ir oth

Mod'n Dat News Jon
Reaction score
262
What's in the For 50 loop? Is it big?

If it's big, it slows down how fast the floating text is displayed due to the processing speed.

So anywho, wanna show me the WHOLE trigger? With the if/then/else's?

EDIT: And explain what you are tryin to do!
 
W

WankerMan

Guest
how can i post the trigger in a scrolling box...its kinda big
 

seph ir oth

Mod'n Dat News Jon
Reaction score
262
...its kinda big

Take more than one picture if needed.

My guess is that the trigger is timed out cause of your sin/cos calculations and how fast you are trying to process em, but I'll verify that when i see the code...
 
W

WankerMan

Guest
I am making a golf game... I am sampling the height of the terrain in a 360 degree ring around a golf ball
at a distance of 100 at 15 degree intervals.....
I loop the entire trigger 500 times becasue I want to see how long it takes to calculate all the data I need to make the gold ball roll down the hill realisitcally.....

After trying to view the floating text.. I am now wondering if the tirgger is even completely running.

I determine which direction the golf ball will roll by summing all the vectors after they are converted to rectangluar then converting the final vector back to polar.









Code:
Calculate Vector
    Events
        Whenever I type "GO"
    Conditions
        TerrainEngineOn Equal to 1
    Actions
        For each (Integer B) from 1 to 500, do (Actions)
            Loop - Actions
                Set FinalYRectangular = 0.00
                Set FinalXRectangular = 0.00
                Set HeightCalculatePoint = (Position of Wisp 0000 <gen>)
                Trigger - Run HeightCalculator <gen> (ignoring conditions)
                Set HeightAtWisp = CalculatedHeight
                For each (Integer A) from 1 to 24, do (Actions)
                    Loop - Actions
                        Set tempPoint = ((Position of Wisp 0000 <gen>) offset by 100.00 towards ((Real((Integer A))) x 15.00) degrees)
                        Set HeightCalculatePoint = tempPoint
                        Trigger - Run HeightCalculator <gen> (ignoring conditions)
                        Set tempheightOffset = (CalculatedHeight - HeightAtWisp)
                        Set XRectangulars[(Integer A)] = (tempheightOffset x (Cos(((Real((Integer A))) x 15.00))))
                        Set YRectangulars[(Integer A)] = (tempheightOffset x (Sin(((Real((Integer A))) x 15.00))))
                        Set FinalXRectangular = (FinalXRectangular + XRectangulars[(Integer A)])
                        Set FinalYRectangular = (FinalYRectangular + YRectangulars[(Integer A)])
                                                                Set FinalVectorPoint = (Point(FinalXRectangular, FinalYRectangular))
                Set FinalVectorAngle = (Atan((FinalYRectangular / FinalXRectangular)))
                Floating Text - Create floating text that reads (String((Integer B))) at ((Position of Wisp 0000 <gen>) offset by (((Real(counter)) x 20.00), 0.00)) with Z offset 0.00, using font size 4.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
                Set FinalVectorStrength = (Square root(((Power(FinalXRectangular, 2.00)) + (Power(FinalYRectangular, 2.00)))))
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        FinalXRectangular Greater than 0.00
                        FinalYRectangular Greater than 0.00
                    Then - Actions
                        Set FinalVectorAngle = (180.00 + FinalVectorAngle)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        FinalXRectangular Greater than or equal to 0.00
                        FinalYRectangular Less than or equal to 0.00
                    Then - Actions
                        Set FinalVectorAngle = (180.00 + FinalVectorAngle)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        FinalVectorAngle Less than 0.00
                    Then - Actions
                        Set FinalVectorAngle = (360.00 + FinalVectorAngle)
                    Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        lastVectorAngle Not equal to 0.00
                        (Abs((FinalVectorAngle - lastVectorAngle))) Greater than or equal to 1.00
                    Then - Actions
                        Set FinalVectorAngle = lastVectorAngle
                        Set FinalXRectangular = lastFinalXRectangular
                        Set FinalYRectangular = lastFinalYRectangular
                        Game - Display to (All players) the text: Big Change
                    Else - Actions
                Set lastVectorAngle = FinalVectorAngle
                Set lastFinalXRectangular = FinalXRectangular
                Set lastFinalYRectangular = FinalYRectangular
                Set CurrentBallXVECTOR = FinalXRectangular
                Set CurrentBallYVECTOR = FinalYRectangular
                Unit - Set Wisp 0000 <gen> movement speed to 400.00
        Game - Display to (All players) the text: (String(FinalXRectangular))
        Game - Display to (All players) the text: (String(FinalYRectangular))
        Game - Display to (All players) the text: (String(FinalVectorAngle))
        Game - Display to (All players) for 0.10 seconds the text: (String((Current movement speed of Wisp 0000 <gen>)))
        Game - Display to (All players) the text: (String(FinalVectorStrength))
 

seph ir oth

Mod'n Dat News Jon
Reaction score
262
Whatever you are trying to do, there's probably a better way to process those if/then/else's...

Anywho, you say that it "times out"...Does that mean the smaller loop does work for a little bit, but not all the way through?

If so, add waits in front of any sin/cos/atan processes. Not big waits, just .1 to .2 waits and see what happens.
 

MoonSlinger

I Love using Cheap Tricks... only Results matters
Reaction score
74
I suggest you use game messages instead of floating text. At least to check if your trigger is running.

Problem with floating text, they can stack on top of each other. Although it might seem only to appears once, it might be 20 floating text stacked together. If your unit: Wisp 0000 <gen> moves leftwards, stacking of the text will happen.

In addition, if your Wisp 0000 <gen> is not moving, you would need a space of 10,000 units to cover your 500 floating text; that would be roughly 100 ziggurats lining up one after another... Hopefully your map is big enough to hold them.

ADD:
Make sure you do not have any "Skip remaining actions" in the triggers, that will simply stop the trigger.
 
W

WankerMan

Guest
I will write a MUCH simpler version of my trigger that illustrates the flaw with 2 or 3 lines of code.

OH guys..... Explain this


This loop should create 500 lines of 24 counts.....

Why does it quit barely through the loop and where the hell did 32 come from?

Calculate Vector
Events
Player - Player 1 (Red) types a chat message containing go as An exact match
Conditions
Actions
For each (Integer B) from 1 to 500, do (Actions)
Loop - Actions
For each (Integer A) from 1 to 24, do (Actions)
Loop - Actions
Floating Text - Create floating text that reads (String((Integer B))) at ((Center of (Playable map area)) offset by (((Real((Integer A))) x 20.00), ((Real((Integer B))) x 20.00))) with Z offset 0.00, using font size 6.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency

im think this is kinda the same phenomena I am seeing on my vector trigger
 

Attachments

  • trigger2.JPG
    trigger2.JPG
    168.5 KB · Views: 258

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
500x24 = 12000... just looping that much without any action is already over the thread execution limit.

Try adding a "wait 0.0 seconds" after the "24" loop.
If that doesn't do it either, use a periodic trigger that runs 500 times.
 
W

WankerMan

Guest
I experimented with my vector trigger.....
I can get it to loop 67 times and display DONE after it finishes


If I change the loop to 68 times.... it will not complete....?

Am I reaching a thread limit?
 

WankerOne

New Member
Reaction score
0
Question for Ace

Aceheart,

My Array is a 6000 Real type array.

I need to populate this array with data that is calculated with a somewhat intensive inner loop. I am using sin and cos ,converting a vector to rectangular so that a sample of vectors can be added then coverted back to polar to extract the resultant angle. I then need to store these calculated angles in my array

How would you recommend this be done?
All my loops seem to over exert the trigger engine
 

Master

Thou shall be helped by...The Black Adder!
Reaction score
72
Could you post your trigger or...some sort of the trigger?

...and may I ask why you only refer to AceHart? :D
 

WankerOne

New Member
Reaction score
0
For each (Integer A) from 1 to 24, do (Actions)
Loop - Actions
Set tempPoint = ((Position of Wisp 0000 <gen>) offset by 100.00 towards ((Real((Integer A))) x 15.00) degrees)
Set HeightCalculatePoint = tempPoint
Trigger - Run HeightCalculator <gen> (ignoring conditions)
Set tempheightOffset = (CalculatedHeight - HeightAtWisp)
Set XRectangulars[(Integer A)] = (tempheightOffset x (Cos(((Real((Integer A))) x 15.00))))
Set YRectangulars[(Integer A)] = (tempheightOffset x (Sin(((Real((Integer A))) x 15.00))))
Set FinalXRectangular = (FinalXRectangular + XRectangulars[(Integer A)])
Set FinalYRectangular = (FinalYRectangular + YRectangulars[(Integer A)])



I need to make this loop more then 67 times
(perferebly 200)

=(
 

WankerOne

New Member
Reaction score
0
here is the height calculate engine

function Trig_SetHeightAtWisp_Actions takes nothing returns nothing
set udg_CalculatedHeight = GetLocationZ(udg_HeightCalculatePoint)
endfunction

//===========================================================================
function InitTrig_HeightCalculator takes nothing returns nothing
set gg_trg_HeightCalculator = CreateTrigger( )
call TriggerAddAction( gg_trg_HeightCalculator, function Trig_SetHeightAtWisp_Actions )
endfunction
 
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

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top