Forum Discussion

wandersonwhcr's avatar
4 years ago
Solved

Rules Editor - How to Retrieve Current Player Weapons

Hi people, how are you?

I had an idea for Portal and I am trying to retrieve current player primary and secondary weapons.

How can I do this?

I found the `ReplacePlayerInventory` that receives `InventoryPrimaryWeapon` or `InventorySecondaryWeapon` but I didn't find a way to get these infos by player.

TY

  • MADrag0n's avatar
    MADrag0n
    4 years ago

    @wandersonwhcr 

    U can do it in this way: create two array with all weapons u will use in ur gamemode, one array for primary and one array for secondary weapons, then use this construction to get weapon:

3 Replies

  • MADrag0n's avatar
    MADrag0n
    Legend
    4 years ago

    @wandersonwhcr 

    U can do it in this way: create two array with all weapons u will use in ur gamemode, one array for primary and one array for secondary weapons, then use this construction to get weapon:

  • TY @MADrag0n <3

    Yesterday, after talking with Battlefield Dad on YouTube, he mentioned this workaround, too.

    I finally created my first game mode called "Vultures".

    aav7g5

    I used a loop..break instead of while, but it is the same construction.

    Again, TY so much <3

Featured Places