matrix?

malfy

New Member
Reaction score
4
I need to store 7 skills:12 players preferably in a single variable, must I make an array of 84 or is there a better way to do this? I just really don't know much about tfteditor... thanks in advance
 

Tru_Power22

You can change this now in User CP.
Reaction score
144
You could use hash tables.

Like 1,1. It would still be 84 variables, but it would be nicer.
 

malfy

New Member
Reaction score
4
nice ok yea thats what i need so how do the hastable index work?
like 0,0 - 11,6 or 1,1 - 12,7 and onto a completely different question... how can you break a loop? i have no idea how to use Customscript( exitwhen true) if someone could explain it.
 

Lyerae

I keep popping up on this site from time to time.
Reaction score
105
Arrays are faster (signifigantly) than hashtables.
If you only need 84 indexs (which according to your post, you do), it'll work just fine using arrays.


As for [ljass]exitwhen[/ljass], it's simple. Let's say you made a variable called Integer, and you wanted to exit a loop when that variable held the value of five.
This is what you would do: [ljass]exitwhen udg_Integer == 5[/ljass].

There's a bit more to it, but not much.
 

W!†A_cRaft

Ultra Cool Member
Reaction score
28
is there a good array tutorial, i know how to work with hashtabels but really dont get the arrays
 

Moridin

Snow Leopard
Reaction score
144
Type "array"

Remember that the search function in internet browsers search for the whole string and not related strings.
Also note that a tutorial would most likely be named "Array tutorial" or somesuch...and not "Arrays tutorial".
 

W!†A_cRaft

Ultra Cool Member
Reaction score
28
read both of them. still dont understand sh*t.

I know what arrays are and how they work, i do not know how to properly use them to make things MUI. The gamecache and hashtables i understand but why use arrays they seem so much more complicated than the previously mentioned methods.
 

Moridin

Snow Leopard
Reaction score
144
For the sake of forum rules, I request you to post a new thread regarding arrays and MUI instead of hijacking this one.
 

malfy

New Member
Reaction score
4
ok so i went with an ability array and i did find it to be quite simple, but i have yet another question.... the triggers below both function properly but i can only test my map by myself and what i am wondering is... will there be a problem with the variable "playernum2" if multiple players are purchasing trueshot aura, for the first time, at the same time?

Trigger:
  • trueshot Copy
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Mindstaff
    • Actions
      • Set skill[(Player number of (Triggering player))] = Trueshot Aura
      • Wait 0.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of skill[(Player number of (Triggering player))] for (Triggering unit)) Less than 1
        • Then - Actions
          • Unit - Add skill[(Player number of (Triggering player))] to (Triggering unit)
          • Set playernum2 = (Player number of (Triggering player))
          • Trigger - Run skillstorage <gen> (checking conditions)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of skill[(Player number of (Triggering player))] for (Triggering unit)) Less than 10
            • Then - Actions
              • Unit - Increase level of skill[(Player number of (Triggering player))] for (Triggering unit)
            • Else - Actions
              • Player - Add 1 to (Triggering player) Current lumber


Trigger:
  • skillstorage
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from ((playernum2 x 7) - 6) to (playernum2 x 7), do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • heroskills[(Integer A)] Equal to Acid Bomb
            • Then - Actions
              • Set heroskills[(Integer A)] = skill2
              • Skip remaining actions
            • Else - Actions
              • Do nothing


hmmm and lastly, is there a way to increase the height of an aura animation. For example the "trueshot aura" model is attached at the origin of the hero. is there like a way to attach it at origin+10 or something in height?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top