Originally Posted by Wandamey
I was thinking you could avoid the loop by using the indexes directly, though it may look cleaner, it would bring nothing since you update all the values at the same time.
your way is more resistant against indexes variations too. Don't mind what i said.
|
Your input is still valued
Now I just need an event that is fired when I OPEN my map (by pressing 'M').
As it is now, it counts every time there is ANY change in my bag, which causes lag.
I did look into votan's example using
Lua Code:
WORLD_MAP_SCENE:RegisterCallback("StateChange", WorldMapStateChanged)
GAMEPAD_WORLD_MAP_SCENE:RegisterCallback("StateChange", WorldMapStateChanged)
but it only fires on map change, not when I open it.