Hi all, I’m relatively new to blueprint scripting and I just can’t seem to interpret the win/lose condition for it. The game is a simple prop hunt multiplayer game. The win condition for the hiders is if they remain unfound till the end of the timer then they win. The win condition for the seekers is that they need to find all the hiders before time runs. I’ve been at it for days and its so frustrating and its also the last thing i need to get working in order to wrap this project up. Please any help would be appreciated. This is what i have so far…
in your script your looking for actors with tag hider when you need seeker. also since your using a and if any one of the actors are not set to true then the branch will read false. so either this is an incomplete script or you havent done it right. also just after getting the actors with tag you are seeing if your gamestate has the tag which will probably also be a point of failure.
i made a little script that ill post below which should have the functionality that your looking for. i assume that your just trying to decide which team won and then create a widget telling them so. of course there are a million different ways to accomplish this and this is just one way that i threw together based on what you already are using. the actual solution is wholly dependent on your specific game and everything that goes with that.
This looks like it makes sense! so when you call the endgame function you get all the characters that have the tag hiders in the game and see if they’ve got their caught variable active then add that to the num of hiders caught, the length then gets the number of players that are hiders in the game and see if the num of hiders are equal to the number of hiders caught and then from there you get all the players that are hiders only?? and print either they win or lose. I’ll give this a shot when I get home and see if it works. Will keep you updated. thank you!
it works! i looked through your blueprint and it seemed like your branch condition was off so i flipped it. it seems to be working properly in my project now. thank you so so much! now I just need to figure out how to make it so the seekers win if all hiders are caught at any given time
Glad you got it working. I actully dont have anything off with the branch its done that way by design. I made it so that it tells the hiders if they won or lost amd based on that result it tells the seeker if they won. If you look close you will see that when the hiders lose loop is completed it goes into the seekers win loop. Badically if the hiders lose then the seekers win and vice versa, i designed it so those are the only conditions