Go Back > Developer's Corner > Scripting
User Name
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread Tools Search this Thread Display Modes
Old 08-17-2010, 09:48 AM   #11
Procrastination incarnate
Join Date: Jul 2010
Posts: 28

When looping, x should probably go from curIndex to WordListCurMax-1 instead of what you have there now. However, you can avoid the loop altogether.

Variable - Set WordListCurMax = (WordListCurMax - 1)
Variable - Set curIndex = (Random integer between 0 and WordListCurMax)
Variable - Set curWord = WordList[curIndex]
Variable - Set WordList[curIndex] = WordList[WordListCurMax]
General - Return curWord
Anitarf is offline   Reply With Quote
Old 08-17-2010, 04:30 PM   #12
Junior Member
Join Date: Jul 2010
Posts: 8

I don't see how that would colapse the arry.

Anyway the problem I have now is that I want to have a event that checks when that generated word is used.

and when its used it should be readded to the pool.


the system works perfectly now! dissregard all previous questions, thank you.

Last edited by pinzu : 08-17-2010 at 08:43 PM.
pinzu is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

All times are GMT. The time now is 04:23 AM.

Powered by vBulletin
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.