Download

choose character with HUD

I’m working on a multiplayer game.
At the start of the game you are a spectator, and you have 2 buttons. One red, one blue. How do I make it so that when you press the red button it will spawn you in the area I choose and change the player from spectator to the player he chooses.

There are 2 players, a red player and a blue player, how do I make it so that the moment you press on the red it will change you from blue to red and vice versa? Thanks in advance.

Have you seen the flip flop node? It is a handy way to flip and flop between executing 2 things. Also, something you can do for the player’s color is to use a dynamic material instance (if you only want to have 1 character blueprint), this will let you modify each character’s materials at run-time. I recently did something just like this for a client of mine, and it was pretty easy. If you have Skype, send me a message (Skype info is underneath my username), and I can send you a few screenshots of how to do this, and make sure that I understand exactly what it is you want to do.

this seems like it is really easy to do, but in fact it is actually quite complicated.

I just recently discovered how to do these things myself and it is quite a lot of coding. I am going to see if i can actually release my project on the market complete with these features plus many more. but as Ive never done this before i am not sure if it will work. if not i will do some tutorials or something.

I have 2 characters one blue, the other red. The blue can deal damage to the red and vice versa. Any idea how to make that happen?
I will send you a message in skype anyway

How is the damage applied?

fc4a6080327a740cf98749711c621b016f56095c.png
49e4ff89dad5ff52a3ae311f66c8d30d5060e617.png

That logic is not very good . That bottom bit you’re basically checking the health variable every delta second/frame to see if it is 0 . This is unnecessary and a bad idea . For something like that you should really put it into a function or custom event and only check it when needed not constantly.

You should also take a look at the ApplyDamage (Point and Radial) functions as well as the corresponding OnDamage events. They provide a lot of organization out of the box and also keep you more tied into existing options like “can take damage”.

Big hint: You only need to check the health when the health has changed, since it will be a constant value when it is not changing. That would be the point where you want to see if they should be dead or not.