# How to Make a Class Method Check a Player's Team and Execute Only If They’re Not on a Certain Team 

**URL:** <https://forums.unrealengine.com/t/how-to-make-a-class-method-check-a-players-team-and-execute-only-if-they-re-not-on-a-certain-team/2651205>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite, verse\
**Created:** [August 26, 2025, 7:28pm UTC](https://forums.unrealengine.com/t/how-to-make-a-class-method-check-a-players-team-and-execute-only-if-they-re-not-on-a-certain-team/2651205 "2025-08-26T19:28:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_H121](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_H121](https://forums.unrealengine.com/u/_H121)\
**Post date:** [August 26, 2025, 7:28pm UTC](https://forums.unrealengine.com/t/how-to-make-a-class-method-check-a-players-team-and-execute-only-if-they-re-not-on-a-certain-team/2651205/1 "2025-08-26T19:28:34Z")

</div>

I have this method:

`house_props := class<concrete>():`  
`PropDamaged(Agent : agent):void =`  
` set PropHealth -= DamagePerHit`  
` if (PropHealth <= 0):`  
` TargetProp.Dispose()`  
` VFXSpawner.Enable()`  
` PropTracker.SetValue(PropTracker.GetValue() + 1)`

I want this to execute only if the player isn’t on team #1 so they can’t damage thire own props but the other teams should be able to.

Idealy if I can have an editable to select the wanted team so I copy the verse device not make a new code for each team that would be great.

I’ve been trying for 2 days so any help is appreciated!  
Thanks!

---

<div class="post-metadata">

**Author:** ![Mineblo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mineblo/32/1203575_2.png) [@Mineblo](https://forums.unrealengine.com/u/Mineblo)\
**Post date:** [August 26, 2025, 7:41pm UTC](https://forums.unrealengine.com/t/how-to-make-a-class-method-check-a-players-team-and-execute-only-if-they-re-not-on-a-certain-team/2651205/2 "2025-08-26T19:41:06Z")

</div>

the most simple way to approach it is to make an @editable of the team\_settings\_and\_inventory\_device which has the team set as 1 and then in the code to do

```auto
if(not MyTeamSetting.IsOnTeam[Agent]):
       CodeHere

```

---

<div class="post-metadata">

**Author:** ![\_H121](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@\_H121](https://forums.unrealengine.com/u/_H121)\
**Post date:** [August 26, 2025, 8:25pm UTC](https://forums.unrealengine.com/t/how-to-make-a-class-method-check-a-players-team-and-execute-only-if-they-re-not-on-a-certain-team/2651205/3 "2025-08-26T20:25:09Z")

</div>

Thank you thank you thank you!

---

<div class="post-metadata">

**Author:** ![Mineblo](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mineblo/32/1203575_2.png) [@Mineblo](https://forums.unrealengine.com/u/Mineblo)\
**Post date:** [August 26, 2025, 8:43pm UTC](https://forums.unrealengine.com/t/how-to-make-a-class-method-check-a-players-team-and-execute-only-if-they-re-not-on-a-certain-team/2651205/4 "2025-08-26T20:43:38Z")

</div>

No problem
