I’m making a gamemode that includes the advanced parkour mechanics and with pickable weapons. But at the Weapon part, I’ve encountered 2 issues.
Here’s a Variable and Rule Trees I’m focused at.
Global.PLAYER = Me (Human Player)
Global.PRIMARY_WEAPON - Players in Slot 1 (TEAM OF (Global.PLAYER))
Global.SIDE_ARM - Players in Slot 2 (TEAM OF (Global.PLAYER))
Global.CURRENT_WELDED_WEAPON - For either Primary or Sidearm Weapon Dummy Bots.
/_Create HUD for the Player
Conditions:
Has Spawned (Global.PLAYER) = True
Actions:
Create HUD Text (Global.PLAYER)
Custom String
[0] (Ammo of Global.CURRENTLY_WELDED_WEAPON)
[1] (Gap Between the Texts)
[2] (Global.PLAYER.Bullet_Time_Left)
/_Player Picks Up Weapon
Conditions:
Distance Between (Global.Player), (Global.PRIMARY_WEAPON) <= 3
Is Button Held (Global.Player), (Interact) == True
*(Disabled) Is in View Angle (Global.PLAYER), (Global.PRIMARY_WEAPON), 25 = True
Actions:
Set Global Variable CURRENTLY_WELDED_WEAPON = (Global.PRIMARY_WEAPON)
The HUD Text’s client (me) can’t seem to read the current ammo of a Dummy Bot through two variables or something, or not at all. Even when I set them directly.
Custom String
[0] (Ammo, Players in Slot, 1, (Team Of, Global.PLAYER) - Shows 0, despite the current ammo of Dummy Bot is 30 for ex.
The Hud text still reads my current ammo though when I set it to myself.
Custom String
[0] (Ammo, Global.PLAYER) - Shows my current ammo just fine.
Thus, when testing the ability to pick up weapons, Distance Between, Is In View Angle + Is Button Held conditions doesn’t seem to cooperate with each other in my case. Despite the Weapon Dummy was in the range, and in view angle and I held Interact, nothing happened. I managed to pick the dummy bot weapon up only, when I distanced myself a bit from it, while holding Interact and looking at it, near equally to the Set Distance Number of <= 3.
Is there anything I can do or bypass this… bug somehow?