Weapon Swapping?

Here’s the array populated by the way.

4.12.5 here, :frowning: can you call a reinit pose function? Or may be try to manually set the pose before or after the weapon swap.

try the way I suggested . Im at work at the moment but when I get in tonight I’ll post the screenshots

I can’t access my project today but I will be waiting for your further explanation + screens possibly.

The only way to get thios working for me was to have all the Child Blueprints of the weapons IE RiflePU vs RifleBP… attached to the player and hide them…
then used hide and unhide for each action… at the moment i see you using only FP_GUN as a base point for ALL weapons…

the issue i see is when you attach actor and remove its the first ORGINAL BLueprint or skelemesh…
remember things have a hard time removing the Memory location of the object and replacing it… this is what potentially what you are doing

When you hide and unhide it wont ever but may cause collision issues later if not done right
using the SINGLE point of place and replace child actors may work with instances of the weapons… as removing them it still has ref to the orginal parent…

Love the logic though using arrays and stuff obervesly the efficient way to go…

Got an example of how you did it? That way sounds interesting too, seems more simple.

ok so first spawn youre weapons like normal .

so here in the screenshot i am spawning an assault rifle, and a rocket launcher both in the weaponSocket Location.

now i simply set one of the meshes to be hidden. in this case the rocket launcher because i want the assault rifle to be the default primary weapon

then its just a simple case of hiding one and showing the other when you wish to swap.

of course if you want more than two weapons you can simply use an array or enum to set the weapons visibility like others have suggested.

here is the result

hope this helps.

P.S you can tell i do too much programming now . look at the video upload title im so used to camelcasing i just do it automatically now without thinking and i actually find it hard to write normally :-p

EniGmaa - You beat me too it lol NICE setup too

is it worse to do it in the Animation BP… ie bring the mesh ref over to be hit by notifys if you are using holster and armed animations

and

BlizzKrut - Look above =)

hehe thanks. no there are multiple ways to do it. i was just showing him the simplest way that was like his original setup in the first post. and also because he said “i dont care about animations i just want it to switch”

hehe thanks. no there are multiple ways to do it. i was just showing him the simplest way that was like his original setup in the first post. and also because he said “i dont care about animations i just want it to switch”
[/QUOTE]

Thank you very much, I’ll try this tomorrow when I’m with the project and I’ll post the results here.

hehe thanks. no there are multiple ways to do it. i was just showing him the simplest way that was like his original setup in the first post. and also because he said “i dont care about animations i just want it to switch”
[/QUOTE]

Can you show the rest of your first image that you posted up there? The blueprint one.

What do you mean mate . Everything you need is shown? Which bit are you confused about

its the missing edge after the “AttachActorToComponet” node… didnt think anything was needed after that though…

Guys I need some help from those who know Unreal. I don’t yet have this code to beable to swap weapons meshes in my game I would like to add that to my game but I don’t have the blueprints code… Although I tried to do the Ledge Grab Tutorial to allow me to run up walls or climb up ledges, that took me four hours to do all the wiring up of all the nodes. but when I tried to run that ledge grab project in 4.8.2, I came across three Duplicate Function Blueprint Errors in the Anim Blueprint and It refused to compile, and I do NOT know how to resolve this type of error because Unreal can’t even find the links to the nodes to show me where the hyperlink blueprint nodes with the error are located because there’s 0 warnings.

Compiler errors:

Error Found more than one function with the same name ClimbingKnees_BI;
second occurance at (none)

Error Found more than one function with the same name WallSliding_BI;
second occurance at (none)

Error Found more than one function with the same name ClimbingLedge_BI;
second occurance at (none)

Warning [0352.21] Compile of ThirdPersonAnimBlueprint failed. 3 Fatal Issue(s) 0 Warning(s) [in 333 ms]

This is the results I’m getting after manually wiring the project in 4.8.2

Unreal is giving me compile errors on the Anim Blueprint to do with Blueprint Interface functions but can’t find the nodes causing the errors. The Tutorial was made with version 4.8 and I did the tutorial in Version 4.8.2 of the engine. Because I couldn’t do the tutorial in version 4.12 because when I tried to migrate the project from 4.8 to 4.12 it crashed on loading the project.

But When I reloaded the 4.12 engine up again and opened up all the blueprints files of the project manually to see what’s going on, all the blueprints were full of blueprint warnings notices on their nodes. all were missing their functions.

Is this some kind of compatability issue that I’ve run into?

I also don’t have any animation with my third person working anymore because the anim blueprint can’t compile even though the animations are still all intact and working in the animation folder. so all I have is a guy in a t-pose moving around with no animations playing anymore so I know the anim state machine has stopped working, the animations are not getting passed because of the compiler error… The rest of the blueprints are not showing any warning signs or errors…

.

Hey, I’m getting an error when trying to change, here are my screenshots corresponding with yours.

Here’s the error:

Just read the exception.
It says Shotgun/Pistol does not exist. Make sure you have set a valid reference.

2nd image down its not connected to anything?

yeah hope you saved a copy before migration to different version… generally mine dies and have to remake after that mess…