Flashlight attached to clothing - how?

Apologies ahead of time, I just can't figure this shit out. I've given up on trying to have a working left-handed flashlight, instead now all I want to do is attach a flashlight to the character's clothing similar to The Evil Within or Silent Hill and be done with it.

I've gotten as far as a working flashlight prefab but I do not understand how to attach it. Can someone share any insight into next steps after creating the flashlight?
 
Attaching the flashlight to clothing would be the same steps as setting it to the character's hand, actually a bit more so because you'd need to create a new item slot specifically for that item. @Cheo created a video showing how to setup the flashlight that you can follow for setting it up in the character's hand:


For the left hand you'd use a slot value of 1 instead of 0. With that said, if you want the flashlight on the character's clothing and not use the item system then you would need to script a new flashlight component completely.
 
I do appreciate your help. I know these are dumb questions.

What do you mean by 'creating a new item slot specifically for that item'. Is that creating a GameObject + Object Identifier and placing it on the character?

*edit*
Disregard - I think I figured this part out..
 
Last edited:
I made a flashlight prefab and I've even got it attached to the body where I'd like it but I'm having 2 problems:

1 - how do I auto-equip it? as soon as I hit play, the first picture happens. I have to scroll the mouse wheel to activate it? equip it? (I really don't know what's going on) so that I end up at the second picture, which is what I want the default to be.

2 - how do I actually turn on the flashlight? the only way it works for me is if I manually enable the light in the Hierarchy. I've done Cheo's tutorial a number of times but none of them have actually gotten me to the point of a working on/off light.


edit
100000 is the object identifier for the flashlight/chest
 

Attachments

  • Screenshot 2024-05-09 120812.png
    Screenshot 2024-05-09 120812.png
    434.1 KB · Views: 2
  • Screenshot 2024-05-09 120825.png
    Screenshot 2024-05-09 120825.png
    404.5 KB · Views: 3
  • Screenshot 2024-05-09 121850.png
    Screenshot 2024-05-09 121850.png
    27.2 KB · Views: 3
  • Screenshot 2024-05-09 121916.png
    Screenshot 2024-05-09 121916.png
    51.6 KB · Views: 3
Last edited:
1 - how do I auto-equip it? as soon as I hit play, the first picture happens. I have to scroll the mouse wheel to activate it? equip it? (I really don't know what's going on) so that I end up at the second picture, which is what I want the default to be.
On the EquipUnequip ability for slot 0 you can specify the auto equip type. You can also manually call EquipUnequip.StartEquipUnequip(n) where n is your ItemSet. This page has more info: https://opsive.com/support/document...lities/item-abilities/item-set/equip-unequip/

2 - how do I actually turn on the flashlight? the only way it works for me is if I manually enable the light in the Hierarchy. I've done Cheo's tutorial a number of times but none of them have actually gotten me to the point of a working on/off light.
This is done with the Usable Action Module Groups. Take a look at the demo flashlight for an example of the modules that we are using.
 
Top