# Need Agent in Tracker :(

**URL:** <https://forums.unrealengine.com/t/need-agent-in-tracker/1650898>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [January 29, 2024, 5:03am UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898 "2024-01-29T05:03:28Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodriges2.7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rodriges2.7](https://forums.unrealengine.com/u/Rodriges2.7)\
**Post date:** [January 29, 2024, 5:03am UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/1 "2024-01-29T05:03:28Z")

</div>

I need to somehow get an Agent referenced in my tracker to not get everyones Tracked Value and only for onr person but i dont know how to do it. I havent written anything related to the agent and there is propaply an easy way to get the agent there, would be realy happy over some healp here is the place were i have the probleme 🙂 (the one is called TargetValueNew on purpose.  
 ![Bild_2024-01-28_212722277](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/8/1/a81fe0fbdda7cd85145c45cd5fa8d35496c6ac11.png)

---

<div class="post-metadata">

**Author:** ![bananna\_manuk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bananna\_manuk](https://forums.unrealengine.com/u/bananna_manuk)\
**Post date:** [January 29, 2024, 9:28am UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/2 "2024-01-29T09:28:04Z")

</div>

you can get all agents

```auto
Players:=GetPlayspace().GetPlayers()
            for(i : int = 0..Players.Length):
                if(Player : agent = Players[i]):
                      if(Agent : agent = agent[Player]):

```

---

<div class="post-metadata">

**Author:** ![ManualPotato](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/manualpotato/32/1144902_2.png) [@ManualPotato](https://forums.unrealengine.com/u/ManualPotato)\
**Post date:** [January 29, 2024, 2:03pm UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/3 "2024-01-29T14:03:03Z")

</div>

This loop which doesn’t contain unnecessary steps might be easier to understand.

```auto
for. Player : (GetPlayspace().GetPlayers())
do:

```

---

<div class="post-metadata">

**Author:** ![Rodriges2.7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rodriges2.7](https://forums.unrealengine.com/u/Rodriges2.7)\
**Post date:** [January 29, 2024, 2:11pm UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/4 "2024-01-29T14:11:28Z")

</div>

if i now copy and past it in like this it still wont work do you know why? Thanks for the help allready  
 ![Bild_2024-01-29_151002751](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/f/0/bf0e1c56e24a5b8fa308ab6025314f89a857abe1.png)

---

<div class="post-metadata">

**Author:** ![bananna\_manuk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bananna\_manuk](https://forums.unrealengine.com/u/bananna_manuk)\
**Post date:** [January 29, 2024, 2:21pm UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/5 "2024-01-29T14:21:33Z")

</div>

Replace (agent:agent) with (Player)

---

<div class="post-metadata">

**Author:** ![Rodriges2.7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rodriges2.7](https://forums.unrealengine.com/u/Rodriges2.7)\
**Post date:** [January 29, 2024, 2:34pm UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/6 "2024-01-29T14:34:22Z")

</div>

I dont know what i did wrong here but it is still marked red  
 ![Bild_2024-01-29_153402438](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/f/b/0fb2e8fbaba841a807d8d5874b349b41e4a765e8.png)

---

<div class="post-metadata">

**Author:** ![ManualPotato](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/manualpotato/32/1144902_2.png) [@ManualPotato](https://forums.unrealengine.com/u/ManualPotato)\
**Post date:** [January 29, 2024, 2:53pm UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/7 "2024-01-29T14:53:39Z")

</div>

You need to indent the block below the for loop so it’s inside the scope of the for loop.

---

<div class="post-metadata">

**Author:** ![ManualPotato](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/manualpotato/32/1144902_2.png) [@ManualPotato](https://forums.unrealengine.com/u/ManualPotato)\
**Post date:** [January 29, 2024, 3:03pm UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/8 "2024-01-29T15:03:10Z")

</div>

Why do you have the `loop:` up top? that’s going to give you an infinite loop… If you describe what it is you are trying to do I could try writing script example for you but I’m not totally clear on what you want.

---

<div class="post-metadata">

**Author:** ![bananna\_manuk](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@bananna\_manuk](https://forums.unrealengine.com/u/bananna_manuk)\
**Post date:** [January 29, 2024, 7:58pm UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/9 "2024-01-29T19:58:46Z")

</div>

ok 3rd time lucky 😛

```auto
for. Player : (GetPlayspace().GetPlayers())
do:
    if(Agent : agent = agent[Player]):
        Targetvalue7 := Tracker8.GetValue(Agent)
        etc..
        etc...

```

---

<div class="post-metadata">

**Author:** ![Rodriges2.7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rodriges2.7](https://forums.unrealengine.com/u/Rodriges2.7)\
**Post date:** [January 30, 2024, 8:52pm UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/10 "2024-01-30T20:52:13Z")

</div>

sorry that i didnt answere yesterday but i want to make a ranked system were it checks the tracker every second to look what rank the player is and add a ui and it now gets the ui of the players but always changes betwen them so for one second ther is your score displayed and the next time it is your enemies i have send you a part of my code and the rest is built up like it.  
OnBegin():void =

```
    loop: 
        for. Player : (GetPlayspace().GetPlayers())
        do:
            TargetValue7 := Tracker8.GetValue(Player)
            TargetValue6 := Tracker7.GetValue(Player)
            TargetValue5 := Tracker6.GetValue(Player)
            TargetValue4 := Tracker5.GetValue(Player)
            TargetValue3 := Tracker4.GetValue(Player)
            TargetValueNew := Tracker3.GetValue(Player)
            TargetValue2 := Tracker2.GetValue(Player)
            TargetValue := Tracker.GetValue(Player)
              
            set Time = Time + 1
            Sleep(1.0)
            if (Time < 1200):
                Print ("Its the {Time} second")
                if (TargetValue >= 0):
                    if(TargetValue2 < 1):
                        ShowRanked := RankedUi.Show()
                        ShowRanked
                        Print("tracker is at {TargetValue}")
                        if(TargetValue =1):
                            ShowProgress5 := ProgressBar5.Show()
                            ShowProgress5
                        if(TargetValue =2):
                            ShowProgress10 := ProgressBar10.Show()
                            ShowProgress10
                        if(TargetValue =3):
                            ShowProgress15 := ProgressBar15.Show()
                            ShowProgress15
                        if(TargetValue =4):
                            ShowProgress20 := ProgressBar20.Show()
                            ShowProgress20
                        if(TargetValue =5):
                            ShowProgress25 := ProgressBar25.Show()
                            ShowProgress25
                        if(TargetValue =6):
                            ShowProgress30 := ProgressBar30.Show()
                            ShowProgress30
                        if(TargetValue =7):
                            ShowProgress35 := ProgressBar35.Show()
                            ShowProgress35
                        if(TargetValue =8):
                            ShowProgress40 := ProgressBar40.Show()
                            ShowProgress40
                        if(TargetValue =9):
                            ShowProgress45 := ProgressBar45.Show()
                            ShowProgress45
                        if(TargetValue =10):
                            ShowProgress50 := ProgressBar50.Show()
                            ShowProgress50
                        if(TargetValue =11):
                            ShowProgress55 := ProgressBar55.Show()
                            ShowProgress55
                        if(TargetValue =12):
                            ShowProgress60 := ProgressBar60.Show()
                            ShowProgress60
                        if(TargetValue =13):
                            ShowProgress65 := ProgressBar65.Show()
                            ShowProgress65

```

---

<div class="post-metadata">

**Author:** ![Rodriges2.7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rodriges2.7](https://forums.unrealengine.com/u/Rodriges2.7)\
**Post date:** [January 30, 2024, 8:53pm UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/11 "2024-01-30T20:53:58Z")

</div>

thanks for the help allready a lot helpers like you save my day 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [February 29, 2024, 8:54pm UTC](https://forums.unrealengine.com/t/need-agent-in-tracker/1650898/12 "2024-02-29T20:54:49Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
