#Inventory Management Optimization Advice
1 messages · Page 1 of 1 (latest)
thanks dyno
I literally said no bad words at all
I was going to help but no, nevermind i guess not
how the fuck are we still getting that issue here
Fuck you dyno.
The players list and the item itself, compare if you already have it in your inventory.
If true then you can't have another gun. If false then add to your inventory.
ez
sorry if this is dumb, but why do you need to be constantly checking? Why not just check when an item is picked up?
its probably because its checking for a certain weapon at a certain point in time. with it constantly checking, its like a soft lock for having someone accidently grab something they shouldnt have. although, your idea seems valid in comparrison
I was thinking of the pick-up event for props, but I suppose custom stuff might not have that
I know for a fact there are pickup/drop events, i just forgot what they are called
They were what I suggested in my response that Dyno deleted
I believe its On Object Grabbed, or Player Grabbed Object
Why does Dyno have personal beef with you I can’t even remember the last time somebody else had any warnings
your system is horrible
I believe the event is global but, its easy to localize
I would advise a system like this for grab detection, as the event is received a little early
Actually, its probably even better to use For Each instead of just acting on the first element every frame
But yeah, you could keep track of what objects are held/not held using grab events, and you could also record the type of object using a second List<String> variable
then, when an object is picked up, if its type is "Gun" and gun is already contained, unequip it
If Equals
If Match = 0, output here
Because the only case is 0, the "Failed" output is only executing if the list count is greater than 0, because if it was 0, it would attempt to go through the 0 exec, which is connected to nothing
If the value is 0 it goes through that exec port
yes
Failed means it’s none of the values on the right that’s being detected
Up to 63
fuck around and find out
Go to the search menu, go to the circuits menu, and just scroll through all the circuits and see if one catches your eye
then you can fuck around, go "oh shit thats cool" and find out
On Player Grabbed Object fires earlier than it should, if you try and unequip an object instantly after this is received, it will fail
So, instead, we do it the next frame
So that’s why I had to put a delay when I use that 🤔
Only issue with delay is that, there is always a chance a player grabs 2 objects on the same frame
And I care about reliability, not difficulty
List Clear when done
oh wait, what method are you using?
For Each = List clear when done
First element per frame = Remove element 0 when done
My system should be the exact same, assuming rec room has no weird interactions
Add items into a list on grab, remove items from list on release
If an item is grabbed and you already have a gun, drop it
im just biased against Player Get Equipped Objects
I hate dominant/offhand + I hate the way its formatted