• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] good indexing

Status
Not open for further replies.
Level 17
Joined
Jan 21, 2010
Messages
2,111
Which one is the good and efficient GUI/MUI indexing?
  • Set index_skip = (index_skip+1)
  • Set index_times = (index_times+1)
  • Set index_off[index_times] = true
Or
  • Set index1 = (index1+1)
  • Set index2 = (index2+1)
  • Set indexoff[index1] = true
Or this one
  • Set index[1] = (index[1]+1)
  • Set index[2] = (index[2]+1)
  • Set indexoff[index[2]] = true
 
Last edited:
Level 28
Joined
Jan 26, 2007
Messages
4,789
You'll have to explain your triggers a bit further, as I have trouble trying to see how you use these indices.
I assume "(index1 1)" means "index1 + 1"? (You haven't used the symbol "+").

This is Hanky's system (and honestly, if I ever index: I use this. Though I don't index often anymore).
It's a very good, dynamic indexing system.
  • Set indexSize = indexSize + 1
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • indexSize Greater than indexMaxSize
    • Then - Actions
      • Set index[indexSize] = indexSize
      • Set indexMaxSize = indexSize
    • Else - Actions
And to recycle an index:
  • Set tempInt = index[loopInt]
  • Set index[loopInt] = index[indexSize]
  • Set index[indexSize] = tempInt
  • Set indexSize = indexSize - 1
  • set loopInt = loopInt - 1
Where "loopInt" is used to loop through all indices (the spell/system loop).
 
Status
Not open for further replies.
Top