So I’ve been watching the blueprint networking vids put out by epic and it occurred to me that I would like to know how to make a pick up that adds to the players bomb inventory after depleted. I know how to make a pick up, I just cant seem to figure out how to make it add to the bomb count and allow the player to throw more bombs. Any suggestions?
Create a new actor blueprint add the model and collision of the object. Than you’re going to want to add a server check if the players actually in the collision box along with the server getting the players ammo. Check it against the max ammo if you made one and add the ammo up to the cap this would be server sided as-well.
It’d look something like this on the blueprint in the event graph for it;
Overlapping Characters > Check Character is ours > Pass onto authority > check players bomb count against max bombs > check if player and model are actually overlapping > add bombs
any chance you could post a screen shot of a blueprint example of what you explained here? I’m still new to blueprints and not quite sure what you mean with all the checks you have here.
If you watched the network tutorials you’ll know how the switch works so something like this but in blueprints (worst C++ ever)
if ammoModel.overlap == true && actor == myCharacter.overlap){
switchHasAuthority(); // W.E the call is
if (thereCharacter.ammoCount => maxAmmoCount || ammoModel.overlap != thereCharacter.overlap ){
GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, "Ammo is greater than max allowed");
else{
thereCharacter.ammoCount += ammoPerPick
destroy(ammoModel):
}
}
That won’t work but you’ll get the basic logic of how to do that in a blueprint
I should’ve mentioned I’m not a programmer either lol but I do get the idea. I’ll play around with it and get it to work. When I do I’ll update with a screenshot just incase someone else has this question. Thanks SOTO!
