1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Dismiss Notice
  5. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

World Editor keeps creating mystery problem.

Discussion in 'World Editor Help Zone' started by ventuz, Feb 10, 2008.

  1. ventuz

    ventuz

    Joined:
    Jan 15, 2008
    Messages:
    10
    Resources:
    0
    Resources:
    0
    I can't stand it anymore.. I'm pretty close to finishing up my map.

    I change "count down" trigger to make debugging go quicker and figure out whats the problem in map, which I already solved. I tried to go change back count down trigger the way it was before. Now what happen?.. It didn't restore.

    I mean before when I was debugging, count down was only 1 second. I wanted to fix it that new count down is 10 seconds, but it still only doing 1 second. I mean WTF, is it ignoring "Integer A from 1 to 10"? It WAS working before.

    • Set countdownint = 10
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • Game - Display to (All players) for 1.00 seconds the text: (String(countdownint))
        • Set countdownint = (countdownint - 1)
        • Wait 1.00 seconds
    • Game - Display to (All players) for 3.00 seconds the text: Go!


    Explanation - this is ONLY small part of whole trigger, the reason I'm using countdownint is that I couldn't do Integer A from 10 to 1, it won't work.
     
  2. YoshiRyu

    YoshiRyu

    Joined:
    Jun 26, 2007
    Messages:
    686
    Resources:
    0
    Resources:
    0
    i'm pretty sure that "from 10 to 1" was never working, because A is incremented at each execution of the loop and so, it never reach 1 starting from 10...

    You should improve your mathematical skill:
    A go from 1 to 10, and you want a countdown going from 10 to 1,
    that's pretty easy... display (11-A)
    A=1 -> 11-A=10
    A=2 -> 11-A=9
    A=3 -> 11-A=8
    ...
    A=9 -> 11-A=2
    A=10 -> 11-A=1

    anyway, their is countdown object in warcraft 3, you sould use it instead
     
  3. ventuz

    ventuz

    Joined:
    Jan 15, 2008
    Messages:
    10
    Resources:
    0
    Resources:
    0
    what you talkin about? you clearly didn't read my trigger. I don't like usual Blizzard countdown because it's ugly and doesn't work along with my command trigger.

    first line is countdownint = 10, it's an integer

    second line is For each integer A from 1 to 10, should execute 10 times! followed by:
    Game display message (countdownint).. so it say 10 first time
    Set countdownint = countdownint - 1, what's wrong with my math?
    Wait 1 second for next number obviously.

    3rd line is simple game message to everyone "GO" when For each is over.
     
  4. YoshiRyu

    YoshiRyu

    Joined:
    Jun 26, 2007
    Messages:
    686
    Resources:
    0
    Resources:
    0
    I clearly read your trigger, that wasn't ask me much time...

    first, "from 1 to 10", there is only 9 instances of the loop.
    then, i just say you that you're "countdown" is equal to 11-A, so it is an useless variable, a simple substraction can replace it, that was the laius about math.
    and finally, i say you that A has always been incremented at each instance of the loop, so it has never be able to go from 10 to 1, because by adding 1 as many time as you want to 10, you never reach 1, you do an infinite loop.

    i have no idea about what your trigger doesn't work, it sould work, but maybe you souldn't copy "only a small part" of it...
     
  5. Los_Tacos

    Los_Tacos

    Joined:
    Aug 5, 2005
    Messages:
    219
    Resources:
    7
    Maps:
    7
    Resources:
    7
    I'm pretty sure there's 10.

    For things like this I'd rather use Jass. The gui loop is sketchy and can only count up, unless you use subtraction but that only makes it more confusing.

    Also having a "wait" in a gui loop could be problematic because Integer A is a global variable.

    Code (Text):
    local integer n = 10
    loop
        exitwhen n<=0
        call BJDebugMsg(I2S(n))
        set n = n-1
        call TriggerSleepAction(1)
    endloop
     
  6. ventuz

    ventuz

    Joined:
    Jan 15, 2008
    Messages:
    10
    Resources:
    0
    Resources:
    0
    After reading this, I'm no longer taking advice from you. From 1 to 10 is 10 instances. I merely only was looking for answer to why trigger NO LONGER WORKS for no reason. But you came to post saying "your math suck, why don't you use blizzard's count down", these aren't what I'm looking for.

    NOW that explains it. Thanks, I'm not good with JASS, it just that too many Blizzard's function to memorize causing me refuse to go learn JASS. Maybe I'll try learn, but I don't got much time anyway.
     
  7. YoshiRyu

    YoshiRyu

    Joined:
    Jun 26, 2007
    Messages:
    686
    Resources:
    0
    Resources:
    0
    I'm pretty sure... that i was too tired when i had written that...
    of course the warcraft loop include both bounds, that's not c++ -_-

    as you wish, i don't care about your life on the hive (i will probably still answer you because i never read the poster's nick when i read a message, but you're free to ignore my advice, you're also free to think i'm stupid, i don't care)
    PS: i've never said "you're math suck", but if you asume that i'm just flamming you, that's probably what you read when i'm juste writing that "you should improve you math skill"

    so now an advice you won't read : if the probleme is because interger A is a global (i dunno, i never use integer A or B) just use a loop on a local integer, to do this, declare à global variable like loop_integer, then, at the begining of the actions, write the custom script "local integer udg_loop_integer", and then, use your loop with "loop_integer" and it should work. (and stay almost fully GUI)
     
    Last edited: Feb 11, 2008
  8. ventuz

    ventuz

    Joined:
    Jan 15, 2008
    Messages:
    10
    Resources:
    0
    Resources:
    0
    I already have another method in head, but I'm not interested on working on map anyway. GUI always increasingly pain in the ass.

    Please move to WEHZ Solved.