# Verse design help: how to increment a counter in a main class if we call functions in another class?

**URL:** <https://forums.unrealengine.com/t/verse-design-help-how-to-increment-a-counter-in-a-main-class-if-we-call-functions-in-another-class/2384622>\
**Category:** Verse\
**Tags:** fortnite-creative, unreal-editor-for-fortnite, question, fortnite\
**Created:** [March 11, 2025, 6:38am UTC](https://forums.unrealengine.com/t/verse-design-help-how-to-increment-a-counter-in-a-main-class-if-we-call-functions-in-another-class/2384622 "2025-03-11T06:38:48Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![DogOnAKeyboard13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DogOnAKeyboard13](https://forums.unrealengine.com/u/DogOnAKeyboard13)\
**Post date:** [March 11, 2025, 11:00pm UTC](https://forums.unrealengine.com/t/verse-design-help-how-to-increment-a-counter-in-a-main-class-if-we-call-functions-in-another-class/2384622/3 "2025-03-11T23:00:50Z")

</div>

Hmm interesting idea, do you also know if this method might need to use the `self` keyword? Note, I plan to use multiple “coin manager” devices one per active stage area and there are multiple stages on my map. I’m still a little new to Verse and I saw there might be a keyword to reference the particular instance being used 🤔  
Like in the [Handler function example](https://forums.unrealengine.com/t/guide-to-event-subscribing-with-additional-parameters-handler-functions/793925):

```auto
Button.InteractedWithEvent.Subscribe(Handler1{Device:=Self, Parameter1:=Value}.HandlerFunction)

```

I think the ultimate thing is I need to make sure I’m changing or updating the original count value somehow and not a copy passed somewhere.

Maybe there’s another way to think about this than how I approached it. When I subscribed to the OnCollected event, I made it use the coinItem’s function directly. Instead of that, maybe first I can send the subscribed event to a function within the coin manager to update the counter, and then somehow trigger the specific coinItem object’s OnCollected function from there. I’ll have to think about it more when I can open my project again.

---

_[View the full topic](https://forums.unrealengine.com/t/verse-design-help-how-to-increment-a-counter-in-a-main-class-if-we-call-functions-in-another-class/2384622)._
