System Timer Ticker

Cohadar

master of fugue
Reaction score
209
It depends really.
But using null data with TT is absolutely possible.
 

emootootoo

Top Banana
Reaction score
51
I just downloaded the TT demo map from here and saved it after opening it (w/ newest ver of jasshelper) and it gave this error:

Function passed to Filter or Condition must return a boolean

call TriggerAddCondition(TT__Triggz[TT__Counter] , Condition(userFunc))

edit: redownload+install fixed it
 

XeNiM666

I lurk for pizza
Reaction score
138
hello, Cohadar.

Been using your System for a while and i would like to suggest a command to pause the General Timer.
 

cr4xzZz

Also known as azwraith_ftL.
Reaction score
51
Merry Christmas (and merry 900 posts to me).

You should update it to 4.0.
 

Darius34

New Member
Reaction score
30
It's automatically paused when it's currently not handling anything
Is it? Do you mean how the callback function Handler does nothing when no functions are assigned?
 

Romek

Super Moderator
Reaction score
964
Oh my bad :eek: Would've sworn that it paused itself when it wasn't running anything :p
I thought it did too. Just checked now, and it doesn't.. :p

Maybe that could be a suggestion for the next version?
..Or maybe there's some explanation for it. (The extra if will slow the system down slightly, and it's not exactly noticeable if it's running anyway).
 

Darius34

New Member
Reaction score
30
Hmm, it does seem like it wouldn't matter much.

Anyway, I saw that 4.0 was out at WC3C before the recent downtime, so it should be posted here as well soon.
 

Cohadar

master of fugue
Reaction score
209
Hmm, it does seem like it wouldn't matter much.

Anyway, I saw that 4.0 was out at WC3C before the recent downtime, so it should be posted here as well soon.

Updated to 4.0.
I am really sorry for not doing this earlier people.
I thought I did it and I just left the scene for some time without noticing it.

hello, Cohadar.
Been using your System for a while and i would like to suggest a command to pause the General Timer.
Somebody already asked that and like I said: testings showed that to be a bad idea.
 

emjlr3

Change can be a good thing
Reaction score
395
Thought:

the limitation of TT is that you can only have one timer inteval - this is nice for any kind of knockback, periodic movement, projectile etc.

but seriously though, sometimes you need something timing out every .1, or .2 - still being able to use TT for things that expire in under .25 or so would be nice

would it be possible to add the functionality in to allow multipules of the timer interval - obviously this can be done from the users end, with a Modulo of some integer that you increase every interval, and only run your effects when desired - but if this could be done internally (within the system), things would be great

for instance:

TT interval = .04

say I want something to run every .2

JASS:
function TT_Multiple_Start takes integer data, integer multiple returns nothing


now if I went and did

JASS:
call TT_Multiple_Start(my struct, 5)


this guy would only be called every .2s, so I didnt have to worry about it at my end

or perhaps you could make it such that

JASS:
function TT_Multiple_Start takes integer data, real interval returns nothing


I would do

JASS:
call TT_Multiple_Start(my struct, .2)


now this is fine for multiples of the TT interval, but if the user specifies a time that isnt an exat multiple, you could run an algorithm to determine the closest time possible

I think this would be a great addition to TT!!!

my only concern is whether the added overhead would be worth it

thoughts?
 

Azlier

Old World Ghost
Reaction score
461
Huh. And I thought
JASS:
function TT_StartEx takes code userFunc, integer data, real period returns nothing

meant that I could specify a period. Especially with the period parameter.
 

emjlr3

Change can be a good thing
Reaction score
395
that uses a timer/instance however

i was suggesting using the single main TT timer
 

Cohadar

master of fugue
Reaction score
209
that uses a timer/instance however

i was suggesting using the single main TT timer

JASS:

public function StartBy takes code userFunc, integer data, integer multipl returns nothing
    if (multipl<2) or (multipl>20) then
         call BJDebugMsg("blah blah")
         return
    endif
    // do the magic here
endfunction


Sounds ok?

EDIT:
==============
hmm I dunno, since it depends on TT_PERIOD which is changeable it coul create problems for people that want exactly 0.2
and calculating approximates is something I don't like.

Besides overhead would slow down the main TT timer.

What I could do however is not add a new function but change implementation of TT_StartEx
If you for example give it a timer that is one of: 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50
it sets all to default 0.05 timer by using multiples
and if it is greater than 0.50 it uses the old behavior

So this way I would have default TT_PERIOD timer, default 0.05 period timer and others would be instance timers.

Sounds sane enough?

EDIT2:
==============
Argh it all sounds somewhat not stable.....
Maybe I should add a new function after all

JASS:

//=============================================================================
//  Allowed periods: 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50
//=============================================================================
TT_StartBuff takes code userFunc, integer data, real period returns nothing
    // check if period is ok
    // do the magic
endfunction


I named it StartBuff because that is what most people would use it for, would someone use it for something else?

Dunno... anyone has any better ideas?

EDIT:
After thinking this thoroughly I concluded that small performance benefit in some special cases is not worth of bloathing the system interface.
TT stays the way it is.
 

emjlr3

Change can be a good thing
Reaction score
395
you'd have to check and see if the overhead addition is worth it
 

Cohadar

master of fugue
Reaction score
209
you'd have to check and see if the overhead addition is worth it

Strenght of my systems is a good interface.
Once I set the good function names I can improve on the implementation as much as I like.

ABC for example is version 6.0 and each version had drastic changes in implementation but all that time function names stayed the same so it did not really matter to end users what is under the hood.

So if I ever decide to include the same period optimization in TT it will be implementation modification.

But right now it is not on my priority list so it will simply have to wait.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
i was thinking how to make use of TT without having the need for a constant period and i think i have an idea so i thought i should ask you about it first:

my idea to add the ability of making non constant period (well not exacly non) was that i would give the period my lowest period needed in my map and add another paramater to the function call for period like in ABCT and the use of this paramater would be used with the Modulo function so each time the Modulo is not equal to 0 it would avoid the use of the action function which was sent.

as far as i thought of it, it seems pretty possible, though i don't know how your system works that well so you can guess why im here.

i hope you understood my explanation of the idea :rolleyes:
 
Reaction score
91
Doesn't this
JASS:
public function StartEx takes code userFunc, integer data, real period returns nothing

provide you that "non-constant" period you're talking about?
Or you wanted something like making the timer start with different periods on each run (like first time: 0.75, 2nd time: 1.25, 3rd time: 0.66, etc.)?
 
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