How could I detect what skin I open?

Recording of the opening system.

So I linked a recording of my case system.
The thing is, I have absolutely no Idea how to check what skin have I obtained.
I tried Vector2 magnitude of the indicator (the red line in the middle of the case opening frame) with every single frame in the scrolling frame and making the drop predefined, but unfortunely none of these two options worked.

And sorry for the poor quality of video.

You should 100% have the drop pre-determined. Otherwise bad actors may manipulate the screen UI’s to change the drop to something more favourable.

When the client opens a case they should be provided the list of all items obtainable as well as the item they actually got. If you want to do it in the same way you got it now, you could do the following:

Say you have 10 different items in the case.
1. Client requests to open a case
2. Server decides which item was won and sends it (possibly along with case conents) to the player
3. The player randomly creates a case with the item types in the case, with the obtained item being any of the items being the correct type
4. UI is tweened to the selected item

Case could look like this, where the number is which item type:
[ 0, 9, 7, 3, 6, 3, 5, 2, 8, 1, 2, 0, 7, 5, 9, 8, 1 ], if you were to obtain the item of type #5, you’d tween until you get to the last 5. This is of course not perfect, as if you would have gotten the item #1 you’d have no more items to the right of it, but that can be solved by adding filler items after it

1 Like

Yeah drops should be pre-determined, the effect should only be a cool little animation, and if this is for some reason client sided then exploiters can just send false information and say that they won something they didn’t.

1 Like

Alright, I’ll try that and answer in a minute.

Works fine to me. I made it pre-defined, and just slighty changed some formulas and it works great now. Thanks pal.

1 Like

However I found yet another problem. When I tween ScrollingFrame’s CanvasPosition to the absolute position of the frame, it doesn’t really end up on the predefined item.

I got what I did wrong. Nevermind

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.