Make HasItemEquipped return true on substrings
if ( player->HasItemEquipped "common_pants_01" ) elseif ( player->HasItemEquipped "common_pants_02" ) elseif ( player->HasItemEquipped "common_pants_03 ) [...] endif
If HasItemEquipped would work like GetPCCell already does this would simply become
; to see if the PC wears pants at all player->HasItemEquipped "pants"
Like pants I'd like to give items different looks (color, shape…) there's nothing else different. Now there is the same script attached to all of them. To check if (further) action shall be taken by the script the equipped status of common_pants_* would be checked, if true nothing is done.
While OnPCEquipped works on the instance level, HasItemEquipped could work on the object level.
In the best case there would be a way to create a type of item and assign different looks, so the object ID would stay the same. What I ask for would not be needed then.
openmw-future, I know ;)
#2 Updated by Who Knows over 2 years ago
In that case here are some ideas
HasEquippedIDLike <substring> ; sounds best for me HasEquippedGrepID <substring> ; would be an alternative but not easy for Windows modders and might look like regexp can be used ; "Item" is not needed, you can only equip items. ; "ID" could be dropped as well. That searching is done on IDs should be clear.