I need urgent help with something pretty simple but I am a beginner. Please help.

I am making a game as a final project in my school’s IT class and presentations start tomorrow so I have max 3 days left. I am making 2.5D sidescroller splitscreen multiplayer game where two people shoot fireballs at each other. I have made everything but can’t figure out how to make a widget to pop up when player hits opponent.
There are 2 players - one uses wasd to move and J to shoot golden fireball and other uses controller and RT to shoot silver fireball. I need to make it so that silver player is immune to touching silver fireball and gold player immune to touching gold fireball but when they touch the opponent’s fireball a widget shows up telling who won. So if gold player dies widget pops up saying “Silver won” and if silver dies a different widget pops up saying “Gold won”. I have been searching and asking everywhere but I can’t figure this out. Can you take a look at my project and help me?

Here is my project: Dropbox - File Deleted

Here’s something about custom collison to make them imune to their own fireballs:

As for the widget, well, it’s just a widget. You add it to the viewport when one of them wins.

I downloaded it and took a quick look. Problems seem to be:

  1. Both players repond to same input ( might be wrong there, do you have this working? )

  2. No hit system or collsion

  3. No points system leading to winner

Does that seem fair?

Ok, scrap that tutorial, you can just put a variable in the player and set it to ice or fire. Then the projectile looks like this:

( that’s the Ice ball of course ). So it only damages the opponent.

Also in the character:

and level BP:

  1. Yeah the 2 players are achieved by a node in level blueprint and all their controls I set up in the same character blueprint. I have one char and there are 2 node trees in it’s blueprint - one for controller player one for keyboard. I just don’t know how to make 2 different chars with their own controls. Hmmm… Wait, I could just copy the player model. Gonna test this out.

  2. Yes, I don’t know how to set it up. I have collision on the sphere objects.

  3. Since this is a simple game I just need for the player to hit opponent once before the widget pops up. So “create widget” can be plugged directly after detecting a hit.

Lastly, on the balls, you need to change the collision on the collision sphere to:

collision.JPG

Sorry for asking dumb questions but how do I get a SET node with target input? When I drop my new variable it doesn’t have that input:
(I renamed character to “silver”

Click on the variable and set it in the details. The default is Fire, the level BP handles changing the second player to Ice.

Nwm I understood

I am getting these errors:

After I changed this, the fireballs now can push around actors but they fly through floor and walls

This is in the level BP, you just created a player, you need to cast to the player type, please refer to my pictures :slight_smile:

Ok, that’s was just me trying to get the ball to actually cause damage, maybe you can find a more useful setting. But it has to trigger the damge event…

Alright, everything’s working now. Where do I plug in the “create widget” nodes?

Ok, in fact, set the collision sphere to ‘no collision’ and set the ball to:

col2.JPG

that does the trick…

Inside the player on damage, make it like this:


There need to be two widgits, one for each player winning.

The spheres still fall through. Where do I plug in the “create widget” node?

Nothing happens when spheres hit players, I am experimenting with different types of collisions but still can’t seam to get any results

The collison on the collision sphere should be set to ‘no collision’. The collision on the ACTUAL ball should be ‘block all’ with ‘simulate generates hit events’.

The widget code goes in the player, when the health is < 0 it puts the widget up.

Ok now the gold fireball can sometimes make the widget appear but only sometimes, it’s inconsistent - sometimes I can throw one ball and win and sometimes I have to throw seven through the player. Silver balls never make widget apear. Both balls fall through the floor. Widget code is in the player:

It’s almost working