The official site of Clan TMMM
 
HomeHomeSearchUsergroupsFAQRegisterLog in


Latest topics
» Hey whats up
by seankly Yesterday at 1:55 pm

» Gotta click fast - WC3 Mazing #mildlyinteresting
by hoffmann Wed Jun 21, 2017 10:28 pm

» I'm getting married and you guys are invited
by Achilles.42 Wed Sep 07, 2016 11:00 am

» Server Photo Album 1
by Pat1487 Sat Aug 06, 2016 5:28 pm

» Legacy of The Void Beta
by Achilles.42 Sun Oct 18, 2015 3:21 am

» Hey guys!!!
by Eat_bacon_daily Fri Oct 16, 2015 11:20 pm

» What everyone been up to
by The_Chosen_Oreo Sun Jun 14, 2015 11:55 am

SC2 Links
SC2 Challenge/Tourney Info

Official SC2 Forums

SC2 Curse

SC2Mapster

Team Liquid

SC2 Replayed

SC2 Strategy
WC3 Links
Clan_TMMM[Host] Info

WC3 Challenge/Tourny Rules

Epicwar
Poll
What game does everyone play now?
Starcraft 2
26%
 26% [ 8 ]
Warcraft 3
35%
 35% [ 11 ]
League of Legends
19%
 19% [ 6 ]
World of Warcraft
0%
 0% [ 0 ]
Diablo 2
0%
 0% [ 0 ]
No games at all
10%
 10% [ 3 ]
Other game not listed
10%
 10% [ 3 ]
Total Votes : 31
Transparency

Share | 
 

 Why isn't my trigger working?

Go down 
AuthorMessage
The_Chosen_Oreo
Corporal
Corporal
avatar


PostSubject: Why isn't my trigger working?   Wed Aug 17, 2011 1:03 am

Ok.. This is my Fixed Point Sliding System.. But it's not working D:

This is the vJass Library for it:
Code:
globals
    rect array r
    real array f
endglobals

library PresetSlideSystem
    function checkx takes real x, real xn returns boolean
        if (x != xn) then
            return false
        endif
        return true
    endfunction

    function checky takes real y, real yn returns boolean
        if (y != yn) then
            return false
        endif
        return true
    endfunction

    function checkequality takes real x, real y, real xn, real yn returns boolean
        local boolean b1 = checkx(x,xn)
        local boolean b2 = checky(y,yn)
        if (b1 != true) then
            return false
        endif
        if (b2 != true) then
            return false
        endif
        return true
    endfunction

    function PresetSlide takes unit u, integer i returns nothing
    local real x = GetUnitX(u)
    local real y = GetUnitY(u)
    local real array xn
    local real array yn
    local integer int = 0
    loop
        exitwhen(int == i)
        set xn[int] = GetRectCenterX(r[int])
        set yn[int] = GetRectCenterY(r[int])
        loop
            exitwhen(checkequality(x, xn[int], y, yn[int]) == true)
            call SetUnitX(u,x+4.00*Sin(0.017453278*f[int]))
            call SetUnitY(u,y+4.00*Sin(0.017453278*f[int]))
        endloop
        set x = GetUnitX(u)
        set y = GetUnitY(u)
        set int = int + 1
    endloop
    endfunction
endlibrary

I then have a GUI Setup Trigger that the person can make for each fixed point sliding section:


Thanks...

-Oreo


Last edited by The_Chosen_Oreo on Wed Aug 17, 2011 2:01 am; edited 1 time in total
Back to top Go down
Serenity09
Moderator
Moderator
avatar


PostSubject: Re: Why isn't my trigger working?   Wed Aug 17, 2011 1:52 am

oreo when you ask for help you need to say a few things

i'm gonna make you a template and you need to fill it all in

Oreo's template for when he needs help:

1. What's it supposed to do?

2. What does it do?

3. What doesn't it do?

4. Explain what each function in it does (small explanations are fine)
Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
avatar


PostSubject: Re: Why isn't my trigger working?   Wed Aug 17, 2011 1:55 am

Ok..

1. It is supposed to slide the triggering unit to a region without letting it get orders (pause unit)

2. It is doing nothing when it is supposed to be sliding

3. It isn't sliding

4. function checkx - checks to see if the units x coordinate is equal to the regions center x coordinate

function checky - checks to see if the units y coordinate is equal to the regions center y coordinate

function checkequality - checks both x and y coordinates using checkx and checky

function PresetSlide - slides the unit until checkequality returns true
Back to top Go down
Serenity09
Moderator
Moderator
avatar


PostSubject: Re: Why isn't my trigger working?   Wed Aug 17, 2011 2:13 am

Back to top Go down
The_Chosen_Oreo
Corporal
Corporal
avatar


PostSubject: Re: Why isn't my trigger working?   Wed Aug 17, 2011 4:16 pm

Thanks seren
Back to top Go down
Sponsored content




PostSubject: Re: Why isn't my trigger working?   

Back to top Go down
 
Why isn't my trigger working?
Back to top 
Page 1 of 1
 Similar topics
-
» Does anyone know why the "Pupil" system isnt working
» Animal ID code not working?
» Help, DDO isn't working :(
» fantage not working!!!!!!!!!
» Isnt MyBrute (now) Boring !

Permissions in this forum:You cannot reply to topics in this forum
Clan TMMM :: Warcraft 3 :: WC3 Tutorials and Help-
Jump to: