# Help with elimination\_result

**URL:** <https://forums.unrealengine.com/t/help-with-elimination-result/2457427>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [April 15, 2025, 4:31am UTC](https://forums.unrealengine.com/t/help-with-elimination-result/2457427 "2025-04-15T04:31:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kelan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Kelan](https://forums.unrealengine.com/u/Kelan)\
**Post date:** [April 15, 2025, 4:31am UTC](https://forums.unrealengine.com/t/help-with-elimination-result/2457427/1 "2025-04-15T04:31:15Z")

</div>

When a player gets eliminated I want to remove that player from the AllPlayers array and remove the same index from the box array and dispose of that box.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/2/f/c2f040b882de4f676eb8794383c253d372428f03.png)

---

<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:** [April 15, 2025, 4:58am UTC](https://forums.unrealengine.com/t/help-with-elimination-result/2457427/2 "2025-04-15T04:58:10Z")

</div>

I haven’t tested this but It should logically be able to do what you want to achieve. And Instead of playing with indexes, it uses a map that essentially “attaches” the player/agent to that specific prop. (Think like an array but instead of having indexes the player itself is the index and then gets the creative\_prop)

```auto
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /Fortnite.com/Game }
using { /Fortnite.com/Characters }
game_manager:=class(creative_device):
    @editable var AvailableBlocks : []creative_prop = array{}

    var AgentsBlock : [agent]creative_prop = map{}

    OnBegin<override>()<suspends>:void=
        for(Player:GetPlayspace().GetPlayers()):
            if(FC:=Player.GetFortCharacter[]):
                FC.EliminatedEvent().Subscribe(PlayerEliminated1)
            if(Block:=AvailableBlocks[0]):
                if(set AgentsBlock[Player]=Block):
                    Print("Block assigned to player")
                    if(ArrayWithoutCurrentBlock:=AvailableBlocks.RemoveElement[0]):
                        set AvailableBlocks=ArrayWithoutCurrentBlock

    PlayerEliminated1(ElimResult:elimination_result):void=
        if(Agent:=ElimResult.EliminatedCharacter.GetAgent[]):
            if(Block:=AgentsBlock[Agent]):
                Block.Dispose()

```

---

<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:** [May 15, 2025, 4:58am UTC](https://forums.unrealengine.com/t/help-with-elimination-result/2457427/3 "2025-05-15T04:58:51Z")

</div>

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