Shoot The Correct Target

Hey, I’m still trying to understand 100% of Unreal and everything but I need to develop a game whose main mechanic is “Shoot the Right Target” kinda. I tried to find a similar tutorial or read the documentation but I couldn’t find anything. Have you guys ever found any public project similar to this or anyone teaching this mechanic? Thx for the attention.

So just like the rest of us!

Perhaps describe the mechanics in more detail so we can try pushing you in the right direction. You’re not getting answers because the question is too vague.

Sorry, first time in a forum + english still hard.

The game consists of five moving targets where each will have a number displayed on it. One of these numbers will be the answer to a mathematical equation previously set in the hud (like 2+3=5, so the target with number 5 will be the right one to hit). I tried to follow some models and ended up coming up with a version where shooting the targets just add up to a score, and if you reached the required score within a limited period of time, you win. I think my biggest doubt is being able to make one of the target actors the right one among the others.

  • I made a new actor that represents the target and gave it a couple of Instance Editable variables:

  • I’ve placed 3 of those targets in the level and edited the values of one of them:


When it comes to detecting it, it really depends on how the rest of the game works. We do not know what shoots the targets really means here so I’ll use the first person template as an example. There’s at least a dozen ways to organise comms here; see if this works for you:

  • in the player:

image

  • I added a static mesh to the target so there’s something we can hit and then:

Essentially, each target calls a Custom Event in the player and pipes in its variables. Again, the above assumes you do the counting / answering in the player.

Hi, sorry for taking sooo long to reply, but thank u soooo much. I was able to recreate something similar with your help and it worked!

Another thing tho, is it possible to change this Projectile Speed numbers on something like a main menu options?
image

Something like a button to change it to a different speed.
Btw, i’m using UE 4.27, SORRY AGAIN FOR NOT TELLING AN IMPORTANT THING!

Sure. A couple of questions:

• is it the player who spawns new projectiles?
• do you already have a main menu?