System Timer Ticker

Cohadar

master of fugue
Reaction score
209
>>ABCT
ABCT..?

>>If someone knows how to use this system, then the one probably knows what is a boolexpr.
You sure?
In the past, I know using CSCache before i acknowledge anything about BoolEpxr.

@Cohadar
You still havent explain about the BoolExpr thingy.

What boolexpr thingy ffs?
There is no boolexpr anywhere in this sys.
It is used like this:

Code:
//==============================================================================
private function PeriodicFunc takes nothing returns boolean
    local SpellData data = TT_GetData() // TT
   // ---- do something here
endfunction


call TT_Start(function PeriodicFunc, data) // TT

Download the map for the example of use before you ask stupid questions. PLEASE.

ABC + ABCC + ABCT
 
Reaction score
456
> call TriggerAddCondition(Triggz[Counter], Condition(userFunc))
There is.
 

Cohadar

master of fugue
Reaction score
209
It is inside the system and invisible to the user so no there is not.
 

Jesus4Lyf

Good Idea™
Reaction score
397
The reason being that if you have one timer that runs at 5 second period for example and you cast a spell in second 2 it will take 3 seconds before spell actually gets activated by the system.
The array system with the countdown that I suggested earlier in this thread works for that, but...
>it is actually faster to use attaching
Fair enough. Just a thought. :D

>Omg~ You are stealing Cohadar's business by making another alike system.
Actually, Key Timers came first and did this already. But talk about KT in the KT thread, kthx.
>It's only text, nothing has been stolen.

>the Initfunc requirement for implementing
My bad, just tested it and it works fine, sorry. :)

With the returns false thing... The fact that it's a boolexpr doesn't matter. Just don't return nothing (lol?). If you want to know what happens if you do, try it yourself. And tell us what happens. :D
 

0zaru

Learning vJASS ;)
Reaction score
60
So,basically, for end the timer the userFunc must return true when all effects are finished or It will leak?
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
This may make fatal error i assume?:
JASS:
//==============================================================================
private function PeriodicFunc takes nothing returns boolean
    local SpellData data = TT_GetData() // TT
   // ---- do something here

return
return true
endfunction


call TT_Start(function PeriodicFunc, data) // TT


Though it is something idiot...

So the userFunc must return a boolean either it is false or true?
 

Cohadar

master of fugue
Reaction score
209
So,basically, for end the timer the userFunc must return true when all effects are finished or It will leak?

true means - stop calling this function and clean up leaks
false means - continue calling this function.

You cannot return nothing I believe NewGen will not even let you compile that.
 

Jesus4Lyf

Good Idea™
Reaction score
397
Ugh... Ok, for those who have never messed with Conditions, or who don't comprehend...

JASS:
function Test takes nothing returns nothing
call BJDebugMsg("Loop")
endfunction

function Trig_Test_Actions takes nothing returns nothing
call TT_Start(function Test, 0)
endfunction

//===========================================================================
function InitTrig_Test takes nothing returns nothing
    set gg_trg_Test = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_Test, 1.00 )
    call TriggerAddAction( gg_trg_Test, function Trig_Test_Actions )
endfunction


You can make a condition out of a function that takes nothing and returns nothing, and the result is the condition seems to return false. I believe the reason is that null converts to 0 which converts to false with booleans.

Example, the above creates a permanant entry in TT. Try it yourself... It constant displays the "Loop" message. However, for safety and uncertainty, I recommend you don't use this. If you want a permanant entry, try this instead...

JASS:
function Test takes nothing returns boolean
call BJDebugMsg("Loop")
return false
endfunction

And just because these suggestions are actually swinging out this wide...
JASS:
function Test takes nothing returns boolean
call BJDebugMsg("Loop")
return null
return false
endfunction

Does the same thing as the first one - returning nothing and shouldn't be used.

Everyone clear? :)

>So,basically, for end the timer the userFunc must return true when all effects are finished or It will leak?
Not leak, just keep looping forever. Returning true is the equivilent of destroying the timer, if you think of the Start call as making a new timer (in effect). Hope that explains it.
Also it shouldn't be when "all effects" are finished, each attachment should perform one effect (imo), and if you want a subsequent effect, call Start again when you return true with a different function, etc.
 

Cohadar

master of fugue
Reaction score
209
If you use function that returns nothing instead of function that returns boolean
it will cause desyncs.

So yeah, try not to play stupid.
 

Jesus4Lyf

Good Idea™
Reaction score
397
Didn't know that. There you go. I was right in saying; DON'T DO IT, PEOPLE! :D :p

Why would you?... lol... :nuts:

Edit: Just wanted to mention something...
>The reason being that if you have one timer that runs at 5 second period for example and you cast a spell in second 2 it will take 3 seconds before spell actually gets activated by the system.

See, the things I used Key Timers for with periods > 1 second was things like checking to see if a unit had left range, or if a hero was more "in battle" to switch a camera's focus or to update a hero's bounty based on the support heroes around it... So it actually doesn't matter if it starts at an odd time. And besides, you don't generally use a timer for spells with periods > 0.5 seconds, you use a loop with a sleep action. :p I'm being general.
 

Cohadar

master of fugue
Reaction score
209
No need to be that hard on him.
His system is indeed edited from TT but he used his original ideas to alter it and make something different.
There is nothing wrong with that, especially when you give credit properly.
Now can we please stop this discussion.


I expect some people to start making spells with TT.
I will not name anyone but...
maybe some nicknames :)
Flare, ~GaLs~, Uberplayer .....
 

Demi666

New Member
Reaction score
127
I did not forget anything, the forum script obviously have some stupid rule to lowercase I in square brackets.

If you don't believe me try quoting my post and see that is capitalized.


Dunno.


LOL GG DAXTREME :D " why use this system " " dunno " :p just thought it was funny

i dont really know what an attachment system does yet:p so ima dl it and find out:D when i come home from pool :p
 

Flare

Stops copies me!
Reaction score
662
sounds interesting, ill give it a go if i can understand it. hopefully you have details in the examples of what certain lines of code do (obviously not the ones irrelevant to the system)

i'd love to know, HOW can you know if the system is faster than everything else, and what is the big deal with it being the fastest if everything occurs in small fractions of a second in the 1st place?
 

Cohadar

master of fugue
Reaction score
209
i'd love to know, HOW can you know if the system is faster than everything else, and what is the big deal with it being the fastest if everything occurs in small fractions of a second in the 1st place?
It is all explained in the first post, you just don't seem to posses enough technical knowledge to understand it....

The big deal with TT is not that it is faster than anything else,
the big deal is that is simpler to use than anything else.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>I expect some people to start making spells with TT.
>>Flare, ~GaLs~, Uberplayer .....
Time to remove your ABC from my computer.
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
I had using quite lot of attaching system such as HSAS ABC CS GlobalArray Gamecache.
But what I found best was HSAS... Just because it has no limitation of handle for attaching...

I'll probably try using this to make some spells indeed. ;)
 

Jesus4Lyf

Good Idea™
Reaction score
397
>Only if you don't need trigger attaching....

*Thinks of an evil thing to post*
*Keeps an eye on Cohadar's face while he reads*

Hey umm...
You could always use...
*Glances at Cohadar*
Key Triggers, the ExecCount method!
*Looks back to Cohadar and sees a flaming red face*
*Runs the hell away*

:D Just kidding. I don't want to die today. ;)
But I do it.
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top