Please select what you are reporting on:
Unreal Editor for Fortnite
What Type of Bug are you experiencing?
AI
Summary
I’m trying to build a system where a player character can give player’s held weapon to a guard NPC on the same team. Issues I’m seeing are that item granter device appears not to actually grant weapons to guard agents, only player agents. That prevents me from granting same weapon player has to a guard. I tried to work around this by having the guard start with all the weapon types in inventory, and remove all the weapons from NPC except for the weapon player is giving. Even though item remover device does work for removing weapon from guards, the issue I found that prevents my workaround from succeeding is that when the guard NPC’s held weapon is removed, the guard NPC doesn’t switch to the next weapon in inventory, always seems to switch back to pickaxe.
Steps to Reproduce
- Grant weapon to guard using item granter device. Notice that guard does not receive weapon, and ItemGrantedEvent does not fire in verse code.
- Spawn guard with multiple weapons in inventory. Use item_remover to remove held weapon. Notice that guard does not switch to other weapon in inventory.
Expected Result
Item granter device should grant weapons to guards. Weapon should be equipped if guard is not already holding weapon.
If item remover device removes held weapon from guard, guard should switch to other weapon in inventory instead of pickaxe.
Observed Result
Unable to grant weapon to guard using item granter device.
Upon removing held weapon from guard with multiple weapons in inventory, guard equips pickaxe instead of other weapon.
Platform(s)
PC