Top Down Stealth Toolkit

Got it, are you trying to aim with the right joystick in this scenario, and do you know if there is some way to get the direction of that control? Also, could you share screenshots of the entire TargetEvaluation function in BPC_WeaponTargetingSystem?

As of now, the only way aiming works is the “direction” the player is moving. I would like to change it to the right joystick so it’s separate than that. Here’s the blueprint for weapontargeting

Alright, can you try replacing the nodes marked in red here with your controller aim direction?

It’s currently taking the actor’s forward vector hence why the aiming is always in the direction of the player. I believe replacing it with the direction of your controller should fix the issue.

1 Like

Hey, is the loadout system from earlier builds of the toolkit still in? and if so, how can I access it?
loadout

The old loadout system shown there was replaced a few years ago. I might still have the old files lying around in one drive. If you’re fine with using the old 4.19 files, just let me know. I can upload the version to the Marketplace.

Is there an easy way to implement something similar in the new toolkit? I’d like the player to be able to hold more than one item when they pick something up, instead being able to switch between equipment.

It would require changing a decent bit of the logic handling the equipment system. Plus if you need multiple UI buttons to display each of the items, then the equipped items will have to talk to the UI layer on their own as well.

So you’d have to familiarize yourself with how the BPC_EquipmentController works. It can handle different types of equipment, so that part won’t be any trouble. But you’ll have to change the variable EquippedItemDataContainer into an array and then use it based on the selected item index.

How would I handle the functions contained in EquippedItemDataContainer? When I switch it over, I’m no longer able to access them.

If anything, I could take the old 4.19, just to see how it was done before.

I’ve sent the 4.19 files over to Epic. Should be available for download from the Marketplace in a few days. You can just directly convert it to 4.26 or 4.27 after download to see the blueprints.

Since the variable has been converted into an Array, you’ll have to use the array’s Get node using the index of the equipped item. So it would essentially require setting up an index variable for the currently equipped item since there are multiple items instead of one. If you haven’t used Arrays before, it would require familiarizing yourself with them first though.

Also, another option would be to wait for the next update. I’m working on a major revamp of most of the toolkit including support for multiple equipment slots. It will most likely take a few more weeks, so if you’re having difficulty with bringing the 4.19 logic to the 4.26 version, then it might be worth waiting for the next official update.

Ehhhh, having an issue figuring out how to replace them with the controller direction. Nothing standing out as controller direction or rotation or axis to plug in there.

any update on this bub? also, UE5 in the works?

Yea the UE5 version was submitted yesterday. Should be available later today or next Monday for download.

i haven’t had much luck using search function, so apologies if this is already covered somewhere, but i’m trying to get rid of the mouse entirely. I would like to have the characters shoot directly from the weapon directly in front of them. Think Metal Gear Solid on psx, simple, turn, shoot. Is this something that’s already been covered and I just didn’t see it?

Hi there, I haven’t tried this with a controller, but I’m guessing that it should work fine with it since you have already managed to get the player to change direction based on controller inputs. Could you try making the following changes within the TargetEvaluation function of BPC_WeaponTargetingSystem blueprint:

Just let me know if that works. If not, you can send me a screenshot of your controller input blueprint nodes and I’ll see if I can get a controller from someone around and test it out.

Hey, thanks a bunch for the quick reply. I will probably have a few more questions, but for now , with the player ‘keyboard control’ that works just fine. All i had to do for turning in place was a add “game controller left x” in the move right axis mapping in project settings input. works basically out of the box :slight_smile: I was struggling to figure out where the aiming by mouse was happening/how it was happening. Now i just have to figure out how to

EDIT: I Figured this out. On the character mesh i attached an arrow to the “weaponseocket” aligned the arrow to point with the socket, then in the target system:

ok, cool. I have set up the controller, that screen you showed me worked for no longer use mouse to control direction, but curious, how can i get the line to come out of the gun, not my guys chest…I did a video on youtube to show you what i mean

never mind the wolfenstein thumbnail, i didn’t change that lol

Hahaha yea for a moment, I was wondering how this was related to Wolfenstein. :smiley:

Glad to hear that you got it working with the Keyboard control setup. As for the weapon aim location, if you open up the BP_Weapon_Parent blueprint, you can find an interface function called RetrieveMuzzleLocation which is used by the targeting component to determine where the targeting starts from irrespective of the owning actor. By default, I just put in a placeholder arrow component for the muzzle, but you can replace it with the muzzle location of your weapon.

And also make sure to attach the LaserTargeting component in the weapon blueprint to your actual weapon muzzle point instead of the arrow component. That should automatically make sure that the laser fires in the direction of the weapon aiming.

I guess that should make the laser align with your weapon. Let me know if you run into any issues.

EDIT: I did figure out what was wrong, my weapon mesh still had collision enabled, so when it went to the side of the character mesh, collision did collision weirdness.!! I’m just leaving this here incase someone else is having strange issues.

I managed to get the weapon lined up pretty well, I’ll look into the RetrieveMuzzleLocation. If i wanted to change the ‘trigger’ mechanism a bit, how might i do that? Like, right now, you hit “f” and that ready’s the gun, then click the mouse to fire. I want it to be more like, press and hold “F” ready’s the gun, release “F” fires it, would i just hook up the code for left mouse click to the released part of the “Code” (i think they’re called “UseEquippedItem” = “F” and “ConfirmTarget” is the left click yeah?) I have this set up, and it works. I even have it set up so that when pressing “F” the animBlueprint changes state to pistol idol and releasing “F” fires the weapon and animBlueprint plays firing animation. However, when i set the boolean for aiming to be off, the player floats off into outer space. Here’s a youtube clip to show you what i’ve done :stuck_out_tongue:

1 Like