Select the next element out of a list

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

swshark

New Member
Mar 25, 2017
5
1
0
29
Hey guys !

Basically i'm creating a rpg skript and i'd like something like :
code_language.skript:
set {rp.%player%.skill.active} to the next element out of {rp.%player%.skill::*}
But it doesn't work. Any simple workaround ?

Thanks for the help !


EDIT : I found a solution using another variable to "count" the skills and when it reaches the end of the list it goes back to the beginning. It works but that's clearly not optimized so i'm still looking for help !
 
Last edited:
Hey guys !

Basically i'm creating a rpg skript and i'd like something like :
code_language.skript:
set {rp.%player%.skill.active} to the next element out of {rp.%player%.skill::*}
But it doesn't work. Any simple workaround ?

Thanks for the help !
What is the first element? It's never really declared so that syntax isn't great, loop it and check for strings and what not.
 
Status
Not open for further replies.