FPS Tower Defense Toolkit

Thanks for your reply. Now I try to mix the AI from the TPS starter pack with your pack, but I cant get it to work. The AI just stands there and dont move or shoot on me when I walk around. Can you help me with making the AI from the TPS starter pack working with this pack?

Hi, I do not own the TPS Starter Pack. So it’s going to be a bit difficult to say what exactly prevents it’s AI from registering the player character. But the first place I’d suggest looking at would be the class responsible for tracking down the player. If the said AI uses Unreal Engine’s native AI Perception, you would have to register the tower defense player character as a stimulus source so that it can be perceived by the AI bots. If it’s using a custom threat detection system, then it would require adding the player character to it’s list of potential targets.

What would be nice in this pack is a set of AIs that have guns to, like the player :slight_smile: Do you plan to add that in the future? I am developing a lasertag simulator and are in the need of AIs with laserguns and the lasergun in your pack is really great. Also, Im wondering if it is possible to set it to start with the lasergun only and not the other weapons?

I’m currently working on an update targeted for a mid-February release date. I’ll try to include some firing animations for the ranged AI bot.

Thank you for the feedback on Laser weapons. :slight_smile: I was going for something similar to the single burst Laser rifles from Fallout 4. Since you’re going for a laser themed project, you can easily duplicate & customize the stats for Laser Rifle & Scatter Laser to create different variants, kind of similar to what the weapon mods allow in Fallout.

If you want to use only the Laser weapons, head over to the BP_GameInstance blueprint, expand the WeaponDataArray variable, & delete all entries corresponding to other kinds of weapons.

Thanks, I will check that. The animations dont need to be any advanced stuff :slight_smile: Maybe you can use the Epic animation starterpack. Hope they make it into the update. Looking forward to it!

I dont know if this question have been solved already, but is it possible to make the bots move around in random paths and not directly to the PowerCore and still act like a enemy? Also, how can I edit the nav paths? Changing all the entries to the lasergun worked perfect, by the way :slight_smile: One more question, can I change the bots to have laser projectiles too?

Being a template for Tower Defense games, the default behavior of the enemy AI bots is to destroy the Power Core as long as they don’t get interrupted by external factors like for example, the player character. However, you could replace the logic in the ‘MoveToCore’ function (within BP_EnemyAI_Parent class) to have the bot move to random locations in navigable space, instead of towards the Power Core itself.

The ‘MoveToCore’ function gets called only under three circumstances:

  • At the Event Begin Play, when an enemy AI unit is spawned.
  • The Power Core has come into the vision range, & has been set as the active target.
  • The AI has lost track of its active target (usually the player character) & hence decided to return to focus on the default objective.

If you’re not using the Power Core in your simulation, then you probably won’t have to deal with the second case. So essentially it will boil down to the bot heading off to check out random locations whenever it doesn’t have an active target.

By nav paths, are you referring to the blue line that goes from the enemy spawn points to the Power Core? If so, it is generated automatically based on the underlying navmesh. It’s basically a spline component attached to the ‘BP_EnemySpawnPoint’ actors. The ‘CreateNavPath’ event handles the creation of spline meshes to lay down a visible path towards the Core.

As for Laser projectiles, there are a few steps involved (Thanks for pointing it out, I will add this to the tutorial section):

  • First, add a new entry to the enum ‘EProjectileType’ for your Laser projectile.
  • Now, create a new child class based on the ‘BP_Projectile_Base’ blueprint, set it’s ‘ProjectileMesh’ to a cylindrical static mesh, & use a red emissive material on the mesh. Change it’s ‘ProjectileType’ enum variable to the new value created in the previous step.
  • Open up the ‘CreateProjectileOfType’ function within ‘BP_ProjectileManager’, & add a new function to spawn the Laser Projectiles based on the enum switch case. You can check out the existing ‘CreateSeekerProjectile’ function for reference.
  • Finally, set the ‘FireProjectileType’ variable of ‘BP_EnemyAI_Ranged’ to the new Laser value.

With that, you should have your own custom projectile type. Let me know if you have further queries regarding any of the solutions.

Yes, these lines Ive marked. Thanks will try that. And thank you for the elaborated reply.

Im having trouble with getting the laser projectile from your project, hitting my static mesh. It only detects the character in the blueprint. Here is my mesh bluerpint setup and collision setup. Hope you can help with this one.

The damage application workflow for projectiles in the toolkit takes place from the projectile to target direction. Since the default collision logic exists within the projectile class, I’d suggest removing it (the part marked in red in screenshot) from the ‘BP_Projectile_Base’ blueprint, then wrapping up your flash logic as an event within the EVO suit class, & calling the flash event instead from the projectile itself (maybe use an interface if multiple types of actors can respond to laser hits). This way you don’t have to implement a collision check within all the different types of actors (if you decided to add more in the future) that can perceive a laser hit & instead have the projectile handle the function call. The hit actors only need respond to that call in their own way. Let me know if you need any further help with that matter.

Thanks for your reply. I did try to cast to the BP_Projectile_Base from the hit event but that didnt work. I also tried to create a blocking volume to block all, with no luck. Can I paste the EVO suit system nodes into the BP_Projectile_Base in the projectile sector and connect the EVO suit system from the hit event in there? Incase this is the solution, can you show me how I would set up the nodes from the EVO suit to the hit event in the projectile sector?

I’m sorry, I forgot to add the screenshot to the last reply. Yes, I was talking about using the hit registration from the projectile base itself. You can delete the area marked in red in the screenshot below, & instead cast the hit actor to your EVO suit & call the custom flash event. I tried it out by firing at some static meshes as well as a new character class actor & in both cases, it seems to register the hit. So I don’t think you’ll have to change any of the collision settings, seeing that your Object Type is World Static, which blocks the projectiles.

projcoll.jpg

Now I tried this, but it didnt collide with the EVO suit. It compiled fine and the game works. I did a copy of the project file incase anything went south :slight_smile:
I can upload the EVO suit blueprint, incase you want to have a look at it and send it to you.

I don’t think you would need to perform the two Cast-to-Class operations right after the Hit Event. Could you remove them & instead add a Print String with its string input connected to the ‘Other Actor’ parameter of the Component Hit Event. Try firing at the EVO suit object after that & see if it’s printing the actor’s name correctly. It will give us a better idea of where the root cause of the problem lies.

The v3.0 update of FPS Tower Defense Toolkit has gone live on the marketplace.

v3.0 Change Log:

  1. Revamped the visual design of the sample map provided with the toolkit. More details about the workflow at: http://unrealpossibilities.blogspot…dev-log-3.html

  2. Added support for using basic weight distributions to control the spawn probabilities for different types of AI classes. For an in-depth read, check out the dev log at: https://unrealpossibilities.blogspot.in/2018/02/tower-defense-starter-kit-v22-dev-log-1.html. (shared dev log with Tower Defense Starter Kit)

  3. Introduced a data-driven approach to spawning AI bots, with all core AI attributes accessible via a new Data Table. Check out the dev log for detailed information regarding the design at: https://unrealpossibilities.blogspot…dev-log-2.html. (shared dev log with Tower Defense Starter Kit)

Known Issues:

  1. Wierd animations when the player character respawns: Can be resolved by removing the ‘NetworkPlayerStart’ actor from the sample map.

**Edit: **The v3.0.1 update with bug fixes for the aforementioned issue has gone live on the Marketplace.

A free gameplay demo for the v3.0.1 edition of FPS Tower Defense Toolkit (Windows) can be downloaded from: https://www.dropbox.com/s/kucgtzoso6…20Demo.7z?dl=0

All changes within the blueprints are tagged with the boolean variable ‘Version3_0’ [check image attachment] in order to easily identify the alterations made in this update. Comments are also added to describe the major changes.

Added a new tutorial on how to create new levels from scratch: FPS Tower Defense Toolkit Tutorial: How to create a new level

Also updated the following concept overview articles to match the design of the latest version of the toolkit:

Almost done working on the upcoming v3.1 update. The toolkit is finally getting support for multiple power cores:

The v3.1 update of FPS Tower Defense Toolkit has gone live on the Marketplace.

v3.1 Change Log:

  1. Introduced support for Multiple Power Cores. [Dev Log: https://unrealpossibilities.blogspot…dev-log-1.html]

ezgif.com-optimize.gif

  1. Added the option to specify when different types of AI classes will first make their appearance over the course of a level when using the Weighted Wave Spawning System. [Dev Log: https://unrealpossibilities.blogspot…dev-log-2.html]

  2. Added a bunch of performance optimizations. [Dev Log: https://unrealpossibilities.blogspot…dev-log-3.html]

  3. Added Unreal Engine v4.19 compatibility.

Bug Fixes:

  1. Fixed incorrect tower orientations associated with placing towers on inclined grid surfaces.
  2. Fixed an issue with plasmoid projectiles failing to destroy themselves
  3. Fixed the issue of weapons with penetrating shots occasionally failing to connect with the target.
  4. Fixed a bug that caused AI bots to become irresponsive for a short duration upon losing track of a player character that has become non-reachable.

A free gameplay demo for the v3.1 edition of FPS Tower Defense Toolkit (Windows) is now available at: https://www.dropbox.com/s/yfszjcgvw1…20Demo.7z?dl=0

All changes within the blueprints are tagged with the boolean variable ‘Version3_1’ [check image attachment] in order to easily identify the alterations made in this update. Comments are also added to describe the major changes.

Hi Stormrage,

I went ahead and bought the toolkit - thanks for answering my PM’s!

Seem to have come across an issue!

From the AI Waypath, if you only have one line of “Towerbases” the AI path will try and push the AI through the gaps, see below

However, if you place a second row of “Towerbases” behind the first row, the AI will then move to the correct path, see below.

Can you either suggest a fix for this, or deploy a fix as a matter of urgency?

Thanks,

SR

Hey Stoovey, thanks for pointing out that issue. I had recently made some changes to the recast nav mesh configuration and the aforementioned bug was most certainly created as a result of that. I will release the official fix as part of the upcoming update. Meanwhile, you can fix it at your end by increasing the TileSizeUU attribute under the recast nav mesh settings as shown below. Raising it to 600 solved the issue at my end. But if that doesn’t fix it for you, just try increasing it a bit more. The attribute basically controls the amount of nav mesh area that needs to be rebuilt at runtime when you move around nav path blocking objects like Tower Bases.