Arrays (list button activate List props)

Create a new class called utils.verse (any name will work) and then paste the code from the snippet in it, then you will be able to access the SubscribeAgent function. Graeme Bull does a good job of explaining the use of the code snippet in this video

As for the function that has the decides effect, I believe it is the Prop := ItemList[ButtonIndex] so you should wrap it in an if:

if (Prop := ItemList[ButtonIndex]):
    spawn:
        SmoothRotate(Prop)

I hope this gets it working :slight_smile: Good luck

Some extra info on accessing elements in an array:
Anytime we access an element from an array we have to wrap it in an if since there is a chance that the element is not found, in cases such as when the index is less than 0 or greater than the length of the array.

2 Likes