Hi so I am creating a 3 player tag game. So far I have it so it randomly chooses who is it. I also have it so it knows who is it. That is all in the level blueprint. I cannot however figure out how to tag someone. I want it so when a player hits another player he becomes it but I don’t know how to set that up. Any help appreciated!
The simplest method is to use the collision capsule on your character. Go to the Viewport on your character, select the Capsule Component, scroll down in the properties and click on the green + next to On Component Hit. This will create an event where you can check the “Other Actor” you hit and transfer “IT” to them.
A more complex method, would be to have a key you press to tag an opponent. Play an anim montage to play an animation where your arm stretches out to tag them. Have a collision sphere on your hand and check for a hit or overlap event on that collision sphere. If this is a multiplayer network game you would need to put the anim montage in an RPC call to the server to make sure that the anim montage plays on all clients and the server and then use the server to register the collision event to prevent cheating.
I get what your saying with the simple method but I don’t know how to give It. I have the event but the blueprint for all the tag stuff is in the level blueprint and even if I don’t use it. “Is It” is a variable so how can I carry that through the blueprints.
Nevermind I got it figured out. Thanks for the help