Top Down Stealth Toolkit

Hi Ben, I personally don’t see any reason for everyone in your team to purchase a copy if you’re all working on the same project. But the Marketplace license agreements are the more important factor here, and here are the details regarding that:

So yea, I guess you’re good to go on that front too provided it’s within their guidelines. I don’t have any donate button, but if at any point you feel like helping out, you can purchase any of my other products on the Marketplace that you might be interested in. :slight_smile:

I’m pretty sure I have a few of them book marked!

Awesome System you have built! I am curious if there is anyway to implement checkpoints so that your player can spawn at a later point in a level and how might you change the end goal to connect to another level instead of just either replaying or going back to a main menu.

I did see above the suggestion at creating an array of level names and tried to find a way to create a function to call on the new duplicated button in the Mission Summary Widget. I am not sure if I am on the right path but the Open Level formula doesn’t like my Array is am setting from the Integer variable.

Hi Xayias, thank you for the feedback. :slight_smile: I’m guessing that you’re calling this “LoadLevel” event when your custom Next Level button is clicked. Regarding the level selection logic, I’d suggest creating a Name type array in the BP_GameInstance blueprint. Let’s call this array “LevelNames” as you’ve already done. We will be storing the names of each map as specified in the Content Browser.

Select the LevelNames array from the variables list and add new elements to it, with the first element containing the name of your Main Menu map, followed by map names for the actual levels in your game in order as shown here:

Now that we have the level names stored in the array, we can take what you already have with the increased level index and access the element at said index in the array to get the map name, and then pass it to the Open Level node.

That’s all there is to the next level logic, but we need to also make sure that when the first level is loaded from the main menu, the CurrentLevelIndex is increased from 0 to 1. So for this, head over to the Widget_MainMenu, and replace the default logic with the following:

I believe you should have a basic level selection system working now. Let me know if you have any doubts regarding the workflow.

Regarding the checkpoints, I had not considered that before. I’ll do some tests and get back to you later this week.

Thanks! I got it working the way it should, I tested it a little and it seemed like when I had 9/10 collectables obtained i was still able to proceed but at the start of the level with 1/10 I restarted even when clicking the next button. Not sure if it is location based or if it is just not checking for the collectables correctly but I was going to test more tonight when I get off of work, thanks!

Edit: After some testing I was able to pick up a second gem and get caught by a guard and that allowed me to progress to the next level since I created the Next Level button on the Mission Summary.

Glad to hear that you got it working.

By default, the Gem collection mechanic comes into play only in the form of Exit Point becoming activated when all gems are collected. Otherwise, it shouldn’t have any direct impact on loading the next level.

So the first place I’d suggest checking if there is a mismatch in the loaded level would be the “LoadLevel” event. Try putting a breakpoint along its nodes and that will give you information as to whether the level index has been updated for the next map.

My LevelNames Array was updating the value from the Main Menu entry I had at 0 when I was starting from Level One so it was updating the value to the current level it should have been since I have no main menu and the second time clicking the Next Level button to Level Two which was then updating like it should. So now I need to try to find out how to only enable the LoadLevel function only when colliding with the ExitPoint as the Next Level button works even when I collide with a guard since the button exists on the Mission Summary Widget itself. it probably isn’t as easy as bringing the LoadLevel function to the BP_ExitPoint to connect to the OnComponentBeginOverlap function that is called since the LoadLevel I assume still needs to be in BP_GameInstance. Is there a way to disable the function or use a branch to check if the player is colliding with the ExitPoint to either do LoadLevel if true or to run the RestartLevel command on the button press blueprinted out on the Widget_MissionSummary if false? I know this is probably something I can easily google but I feel like typing out the steps helps me understand the logic better and hopefully it will help to have some of this to reference when creating updates to the system in the future!

Alright, so essentially we want to make sure that the Next Level button does not appear if the player hasn’t completed the required objectives, which in this example scenario means collecting all the gems.

For this, the first step would be to set the default Visibility of our new Next Level button to Hidden from the widget details panel. This way, if the game ends due to the player being caught by a guard, there is no option to move on to the next level.

With that taken care of, we can introduce additional logic into the Mission Summary blueprint to make the button visible if the player has successfully completed the objective. Fortunately, there is already a check in place just for that in order to handle the completion time and other text being displayed in the mission summary screen. We just need to add the logic for making the button visible here.

So head over to the DisplayMissionSummary function, and you’ll find the following branch condition:

In the True part of the execution after Branch, just add the extra logic to set the Visibility of your Next Level button to Visible. And I believe that should take care of the issue.

Just wanted to save love the kit! Nice and clean, well documented and not bloated. Great way to get started.

I’ve been playing with the early access of UE5 and TopDownStealthToolKit. In UE5 the BP_GameMode_CoreGame fails to save. I assumed it’s because the project has been around for some time and gamemode probably hasn’t been touched in awhile (reserialized). So I opened BP_GameMode_CoreGame in 4.26 and saved it… then copied that to UE5 and it was fine.

Not what will happen when UE5 is released, but figured I’d post it here in case anyone else runs into similar issues with UE5 early access and TopDownStealthToolKit :grinning:

1 Like

Glad to hear that you’re enjoying the toolkit, @Teella . :slight_smile:

I haven’t tried converting any of my projects to UE5 since the Marketplace hasn’t officially enabled UE5 version support yet. But I really appreciate you sharing your experience with early access. It should help out others until I can finally roll out a 5.0 update for the toolkit.

Hey bud. I was sending messages, but I know with the redesign it’s incredibly difficult to tell. Unfortunately the redesign deleted all the pics in the conversation.

I’m still trying to get the aim plane to be moveable with the gamepad joysticks(right joystick).

You had sent this previously but without the pic I’m at a loss.

Blockquote As a quick primer, the weapon aiming is handled through the **BPC_WeaponTargetingSystem **component, and specifically its **TargetEvaluation **function. The first part of this function deals with firing a Line Trace towards the mouse cursor location. So I’m guessing that changing this logic to instead fire in the forward direction of the character (or weapon mesh once you add that) should do the trick provided you’re able to rotate the character with the gamepad.

Blockquote So in the part leading up to the Line Trace, make the following changes to the Trace End Point calculations and you should be able to have the aiming line face the direction in which the character is facing. I’m able to get it working with keyboard based rotation, so it should hopefully work with the gamepads as well.

I’m here, just trying to figure out where to go from there. Is there a away to instead expose it as an input and I could just tie it to the axis?

Hi dresyn, yea I’ve had the same issue with some of my forums posts as well. I’ve lost quite a few of the images from last year and given that it has been 3 months since the forum update, I’m guessing they’re gone for good.

But getting back to the aiming system, if you’re using a controller, it’s quite likely that you won’t have to worry about the aim plane at all. Instead, you just have to find a faraway location in the forward-facing direction, and do a line trace from the muzzle location to it.

I’ve only tried this with the keyboard, but I believe this should work with your controller as well.

1 Like

So I’ve got that set up, but still confused how I would tell it to point the laser where the right joystick is going. As it stands, I begin the weapon use, the laser will point to wherever the mouse cursor happens to be in the viewport. How do I switch off of the mouse and only use the command the joystick is sending?

I had tested this using the BP_PlayerCharacter_KeyboardControl player character. Are you by chance using the BP_PlayerCharacter_Mouse+KeyboardControl in your project?

Yep, let me switch them and I’ll let you know

I moved on haha, but I’m sure I’ll come back to it soon.

I was hoping you could point me in the direction as to where may I find the blueprint that the AI uses to target the player.

To elaborate, I want it to target a different character BP that is not the ones used by the player.

Sure, for the AI to recognize any object as a primary target or an interest (things to investigate like noise, last seen location, etc), said object should have a Stimulus Generator component. The default player character has one of these for the same reason. So if you want a new character to have a similar role as the player, just implement the following steps:

I. Add the BPC_StimulusGenerator component to it and set its CanGenerateTargetStimulus parameter to True in the details panel.

II. Now have the new character implement the BPI_StimulusGeneration interface and copy the implementation for following functions from the default player character: RequestInterestStimulusActivation, RequestInterestStimulusDeactivation, and RetrieveStimulusGenerationCapabilities.

III. Finally, make sure that the collision settings for the Capsule and Mesh components match that of the default player character.

And that’s it. Now your enemy AI should chase/target this new character.

If you want this character to generate additional stimuli like whistle/footstep noise and so on that the enemy AI can recognize, you’ll have to copy that logic from player character bp (MakeWhistleNoise function for example) as well. I’d also suggest reading up on the documentation for the Stimulus system first to get an understanding of how they work:

1 Like

Thanks

Ok should’ve explained more. I am actually trying to move the AI to a completely different project and game mode. I’ve followed these steps, and am currently adding the variables and functions to the new character and game mode. Anything else you think I should be honing in on with this?