Jump to content
UBot Underground

Recommended Posts

I need some clarification.... Please see *working* attached script.

 

The intention is to loop through the list, and display "Stat: 1 of 5"...."Stat: 2 of 5", etc....

 

The UI Stat Monitor is placed BEFORE the Loop node (as I learned in the tutorial)....and this works....

 

However, since the UI Stat Monitor is BEFORE the loop node, I would not expect this to work....I would think the US Stat Monitor would need to be INSIDE the loop node...

 

Why does it work this way - how does this flow???? Doesn't make sense to me.....?

 

Can someone explain please?

 

Thank you

 

 

post-52010-0-52570900-1586652356_thumb.png

Edited by ShorePatrol
Link to post
Share on other sites

Sorry, I forgot to attach the image (It's attached now) - yes, I see it goes on top, but again, this doesn't make sense to me...if the script runs from the top to the bottom, the UI Stat Monitor runs before it enters the loop, therefore, it's weird that it updates while the loop is running.

 

 

 

 

clear list(%newlist)
add list to list(%newlist,$list from file("C:\\Users\\David\\Desktop\\daves.txt"),"Delete","Global")
ui stat monitor("Stat:","{$list position(%newlist)} of {$list total(%newlist)}")
loop($list total(%newlist)) {
    alert($next list item(%newlist))
}

Edited by ShorePatrol
Link to post
Share on other sites


clear list(%newlist)
add list to list(%newlist,$list from file("C:\\Users\\David\\Desktop\\daves.txt"),"Delete","Global")
ui stat monitor("Stat:","{$list position(%newlist)} of {$list total(%newlist)}")
set list position(%newlist,0)
loop($list total(%newlist)) {
    set(#Debug,$next list item(%newlist),"Global")
    wait(0.1)
}


clear list(%newlist)
add list to list(%newlist,$list from file("C:\\Users\\David\\Desktop\\daves.txt"),"Delete","Global")
ui stat monitor("Stat:","{#loop} of {$list total(%newlist)}")
set list position(%newlist,0)
set(#loop,0,"Global")
loop($list total(%newlist)) {
    increment(#loop)
    set(#Debug,$next list item(%newlist),"Global")
    wait(1)
}
Link to post
Share on other sites

I guess you don't understand my question. I appreciate your reply, and again, my script works...I just don't understand why. I guess once you set a UI Stat, it just updates throughout your script..

Link to post
Share on other sites

I usually place all my UI commands at the end of my scripts. :) That way they're out of my way.

 

You can have five loops in the same stat monitor, the stat monitor is not just for loops. You can use variables in there too.

You can also have multiple stat monitors.

It's just a debug tool and a way to give the user all sorts of information.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...