HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

[Help] Can I get Waits accurate?

07-17-2008, 07:13 AM#1
Tide-Arc Ephemera
Trigger:
Wait 0.01 seconds

That wait goes for longer than 0.01, around 0.2 it feels like.. Is there anything more accurate than that?

Big what the fuck?
I selected the Scripts & Triggers section... ugh... could somebody move this or do I have to make another topic?
07-17-2008, 07:42 AM#2
darkwulfv
It'll get moved.

Regarding your question: Waits have a limit of like, .21 or something close. I thought it was only for PolledWaits, but I guess not. Anyways, your best bet would be timers.
07-17-2008, 08:01 AM#3
Tide-Arc Ephemera
Poop nuggets of anti-awesome. Well since my super special spectacular dream just got crushed by something so simple, I may as well post what I had which was theoretically perfect...

Variables used:
HS_Angle, arrayed real
HS_Boolean, arrayed boolean
HS_ChainLimit, arrayed integer
HS_ChainPieces, arrayed integer
HS_ChainType, arrayed unit-type
HS_LeadInteger, integer
HS_LinkPoint, arrayed point
HS_TempPoint, arrayed point

Collapse JASS:
function TideAE_Checker_Actions takes nothing returns nothing
    local integer LIMIT = 40
    local integer i = 0
    local boolean b = false
    loop
        set i = i + 1
        if udg_HS_Boolean[i]==false then
            set b = true
            set udg_HS_LeadInteger = i
            call BJDebugMsg(I2S(i)+" has been set to true.")
        endif
    exitwhen b==true or i==(LIMIT+1)
    endloop
    if b==true then
        set udg_HS_Boolean[i] = true
    endif
endfunction

Trigger:
EC Energy Chain Copy
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to (==) Energy Chain
Collapse Actions
-------- DO NOT EDIT ANY OF THE BELOW --------
Custom script: local integer leader = 0
Custom script: call TideAE_Checker_Actions()
Custom script: set leader = udg_HS_LeadInteger
-------- DO NOT EDIT ANY OF THE ABOVE --------
Set HS_TempPoint[1] = (Position of (Triggering unit))
Set HS_TempPoint[2] = (Target point of ability being cast)
Set HS_TempPoint[3] = (HS_TempPoint[1] offset by 80.00 towards (Angle from HS_TempPoint[1] to HS_TempPoint[2]) degrees)
Set HS_LinkPoint[HS_LeadInteger] = HS_TempPoint[3]
Set HS_Angle[HS_LeadInteger] = (Angle from HS_TempPoint[1] to HS_TempPoint[2])
Set HS_ChainLimit[HS_LeadInteger] = (10 + (5 x (Level of (Ability being cast) for (Triggering unit))))
Set HS_ChainPieces[HS_LeadInteger] = 0
Set HS_ChainType[HS_LeadInteger] = Energy Chain
Unit - Make (Triggering unit) face HS_Angle[HS_LeadInteger] over 0.00 seconds
Unit - Create 1 Energy Chain for (Owner of (Triggering unit)) at HS_TempPoint[3] facing HS_Angle[HS_LeadInteger] degrees
Unit - Add a (5.00 - ((Real(HS_ChainPieces[HS_LeadInteger])) x 0.20)) second Generic expiration timer to (Last created unit)
Custom script: call RemoveLocation(udg_HS_TempPoint[1])
Custom script: call RemoveLocation(udg_HS_TempPoint[2])
Game - Display to (All players) for 1.00 seconds the text: (String(HS_LeadInteger))
Custom script: call Intboo()
Custom script: loop
Custom script: set udg_HS_LeadInteger = leader
Game - Display to (All players) for 1.00 seconds the text: (String(HS_LeadInteger))
Wait 0.01 seconds
Set HS_ChainPieces[HS_LeadInteger] = (HS_ChainPieces[HS_LeadInteger] + 1)
Set HS_LinkPoint[HS_LeadInteger] = (HS_LinkPoint[HS_LeadInteger] offset by 30.00 towards HS_Angle[HS_LeadInteger] degrees)
Unit - Create 1 Energy Chain for (Owner of (Triggering unit)) at HS_LinkPoint[HS_LeadInteger] facing HS_Angle[HS_LeadInteger] degrees
Unit - Add a (5.00 - ((Real(HS_ChainPieces[HS_LeadInteger])) x 0.20)) second Generic expiration timer to (Last created unit)
Custom script: exitwhen udg_HS_ChainPieces[udg_HS_LeadInteger]==udg_HS_ChainLimit[udg_HS_LeadInteger]
Custom script: endloop
Set HS_Boolean[HS_LeadInteger] = False

If waits worked for the advertised amount, that would've been mighty freaking perfect. Shoddy quality, but I just made that today 'n' I was trying to get the concept right before leaks and timings cleaning.
07-17-2008, 04:01 PM#4
Rising_Dusk
Moved for you.
07-17-2008, 04:09 PM#5
Vexorian
Just use timers like everybody else does already.
07-18-2008, 06:52 AM#6
Tide-Arc Ephemera
Thanks, Dusk.

I was bored and I was trying to make a spell that's very popular in a very simplified form so that anyone could use it... oh wells...
07-18-2008, 07:13 AM#7
Vestras
Is there anything wrong with having 2 triggers, one with the actions above the wait, and one with the actions lower than the wait. Then use a timer to run the second?
07-18-2008, 07:42 AM#8
Tide-Arc Ephemera
Y'see, that's the logical thing to do so...

*starts working*

EDIT!
Vexorian, if it seems like I ignored you I apologize, 'cause RoD_I reiterated what I had in my mind 'n' it sparked the method on how I could do it.