• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

World Editor keeps creating mystery problem.

Status
Not open for further replies.
Level 2
Joined
Jan 15, 2008
Messages
10
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.
 
Level 9
Joined
Jun 26, 2007
Messages
659
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
 
Level 2
Joined
Jan 15, 2008
Messages
10
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.
 
Level 9
Joined
Jun 26, 2007
Messages
659
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...
 
Level 7
Joined
Aug 5, 2005
Messages
218
first, "from 1 to 10", there is only 9 instances of the loop.

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:
local integer n = 10
loop
    exitwhen n<=0
    call BJDebugMsg(I2S(n))
    set n = n-1
    call TriggerSleepAction(1)
endloop
 
Level 2
Joined
Jan 15, 2008
Messages
10
first, "from 1 to 10", there is only 9 instances of the loop.

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.

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

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

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.
 
Level 9
Joined
Jun 26, 2007
Messages
659
I'm pretty sure there's 10.
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++ -_-

After reading this, I'm no longer taking advice from you
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:
Level 2
Joined
Jan 15, 2008
Messages
10
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.
 
Status
Not open for further replies.
Top