Announcement

Collapse
No announcement yet.

Set Array Element not working right.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Set Array Element not working right.

    Sorry if this problem has been answered elsewhere, searching the forum didn't come up with a answer for me.


    https://www.dropbox.com/s/5th8jrogj9...10.51.png?dl=0

    For some reason, when I activate this function, the value targeted from the array isn't changing.

    #2
    Originally posted by Rogarfuryfist View Post
    Sorry if this problem has been answered elsewhere, searching the forum didn't come up with a answer for me.


    https://www.dropbox.com/s/5th8jrogj9...10.51.png?dl=0

    For some reason, when I activate this function, the value targeted from the array isn't changing.
    You are making a temporary array. Changing its value implies changing a temporary variable.

    I believe what you want is to change the value of the referenced variable, from a list. There's lot of different ways to handle this, one I suggest is creating a struct with the Skill Name and a float value and declare an array (inside the class variables) containing each of the skills you want. Access the specific skill you want and set from a persistent variable, not a temporary one.

    You can handle this in lots of manners, but keep in mind that you can't store all of them in a temporary variable and access the specific index that you are NOT referencing the variable you passed to this array, it's just a copy of the previous variable.

    Comment


      #3
      If you wanna change a specific variable based on an integer input, I think you might look into a switch (or, dunno if a select node works with int).
      They broke the signatures so I removed mine thinking it'd be awhile. The signatures work again, but I haven't redone my signature yet.

      Comment

      Working...
      X