I have a basic Pickpocket system now, however i need your help with one thing. I want to set the number of times you can you can pickpocket this enemy to be 1-3 times before the pockets are empty at a random number, 3 being the max. I also wish to have a short cooldown period of time when you first steal, so you can spam the button. Thank you!
It’s just a boolean:
I have all my pickpocket blueprints on the player character, but yours are on the npc.
You said:
the number of times you can you can pickpocket this enemy
It should be in the enemy then. Each enemy can track how many times it can be pickpocketed. is that not what you want?
How will i make them communicate?
You never explained how it works in your game. I assumed you call it somehow - what I demonstrated is a blueprint interface - probably the most common and convenient way to do it.
Ah, my misstake. Should propably have explained better. In my game i have plueprinted it so when i press R when behind a NPC (the npc has a capsule collision) The player steals a random ammount of coins.
But i will find a way to work around your blueprint. Thank you
You need to keep track of the number of times each enemy has been pickpocketed. What I suggested would work really well for this. If all you want is a number of coins, return an integer instead of random array element.
This goes into the player:

The function is implemented in the NPC.
Why are we pressing buttons in the NPC? I though it was the player doing the stealing.
I feel you’re not approaching it correctly.
- the NPC has the coins
- the player approaches the NPC and the player presses the button
- we run a function in the NPC, we get the NPC’s coins
You have your NPC right here:

Implement the stealing functionality there.
Yes it is the Player doing the stealing, however when i try to implement your blueprint into the NPC, i cant seem to get it to connect with eachother with my blueprint.
In the picture, As AI that you are pointing to where does it go?
Use the pin to call functionality in the desired NPC. Or look into the interface communication so you can avoid casting altogether.
To simplify it greatly:
- a function in the NPC:
Script the coins amount here that you can steal and the number of times it can happen, and how often.
- in the player BP: player stealing coins from all nearby NPCs:
You can keep the coins the GM if that’s more convenient, ofc.
How do you know it does not work? Print player coins, what do you get?
You can keep the coins the GM if that’s more convenient, ofc.
Did you forget to inform the Game Mode about your coins?
Again, we do not know how you want it to work.
How do i do send that value to Game Mode? Im rather new to blueprinting.
It does seem work and generate coins, however the issue remaining is that i want it empty the pockets of the NPC of a number between 1-3 and giving it a short cooldown, so that you cant spam R in this case.
Look at the stuff I posted before. It’s all there.
Does it matter? You did not say originally what we were stealing. I thought we’d be nicking objects from NPCs’ inventories. If you want coins, just return an int.















