Win Condition?

Hi All,

I am experiencing a problem and I am hoping someone might be able to help, yet again :slight_smile:.

With one ‘hero’ pawn and one “enemy” pawn the game works fine. The Win/Lose screen works as expected. Everything is fine no problems whatsoever.

So, I decided to add another “enemy” - (just one) - character into the game, and things starting going haywire. Firstly, I can have have both the Win and Lose screen displaying at the same time, when there is green and red screens at the same time it looks like it is trying to show them in 3D, sometimes the proper one shows, sometimes both together. Another problem is on the second playthrough is that the 2nd character who was no line of sight suddenly appears around the corner to shoot at me - that really threw me the first time.

PS: I just moved the character and he no longer just shows up, but the Win Screen is appearing after killing the first character? Like I said I’m lost and don’t know what to do since the code is working 1v1. Sorry I lie, a couple more playthroughs and the character started appearing. It’s really fun when they are both shooting me together and it says after killing the first character that I have won the game then the second character keeps shooting me and the lose screen appears.

Any and all help would be greatly appreciated!!!

Regards.

1 Like

Can you share the code that determines the win condition.

The win condition, on my goodness - I just checked that - and I had it around the wrong way, because of that it wasn’t reporting correctly. Also, when I made the change the 2nd character wasn’t appearing from around the corner, he was sitting in his spot waiting!!! I went to find the other enemy and sure enough when I came into line of sight he started coming after me.

So, now it is working correctly - and I have the bare bones of a working 3rd person 3D shooter game - and I am actually really chuffed. I am not going to fool myself and say that I understand everything - I don’t - but I understand a lot of it. There are things like the movement animations that really don’t make sense to me, and casting that still a mystery, and some of that code in EndGame which went right over my head, and how muliple game modes actually work - but, damn:

  • it’s a working 3D shooter

And I wrote all the code! I’m sure that in time and making further “games” this stuff will become clearer and clearer to the point where I won’t even need to think about it. Man I am glad I did this course and it’s not over yet!

Thanks to EVERYONE who made the course happen and to all those who helped me, with special thanks to Dan Marshall :sunglasses:, or, even those who just read my emails and said : “oh no, not him again” :grin:.

CHEERS EVERYONE!!!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms