I need to look through the groups on an object (target
) for if there's one that ends with Floor
, and then if there is, take its name and remove that Floor
part. As seen in the code bellow, i have every part of that done except the part that finds that group in the array. Ive looked anywhere i could think of for a way to do so, but no result. Anyone know a solution? Also there wont be any objects with multiple groups ending in Floor
so that doesnt need acounting for.
var ItemGroups = target.get_groups()
var ItemFloor = ItemGroups.find(~ending with "Floor"~)
var ItemHeld = ItemFloor.trim_suffix("Floor")