Hello, I've been trying to do something that should be super simple, but I cona't for the life of me find a place that explains the correct syntax for this. on("clicked:repeating_guns:shoot", function() {
getAttrs(["heat", " repeating_guns_$X_gunHeat "], function(values) {
let newHeat = parseInt(values.heat,10)||0;
let gunHeat = parseInt(values.gunRecoil,10)||0;
newHeat += gunHeat;
setAttrs({"heat" : newHeat});
});
}); The repeating section "guns" has a button called "shoot" and a number called "gunHeat", which is supposed to be added to the "heat" value (outside of repeating section) when the button is pressed. I know that a specific value from a repeating section can be acessed by doing repeating_guns_$X_gunHeat with X being the index (starting at 0) of the section, but in this case, the index is "unkown", as it is supposed to be the same index as of the button pressed. I feel like this should be easy, I just don't know what to in place of " repeating_guns_$X_gunHeat "