Announcement

Collapse
No announcement yet.

Weapon Swapping?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by tozan View Post
    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..

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

    Leave a comment:


  • replied
    2nd image down its not connected to anything?

    Leave a comment:


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

    Leave a comment:


  • replied
    Originally posted by EniGmaa View Post
    What do you mean mate . Everything you need is shown? Which bit are you confused about
    Hey, I'm getting an error when trying to change, here are my screenshots corresponding with yours.

    Click image for larger version

Name:	AgmByNB.png
Views:	1
Size:	330.1 KB
ID:	1114297

    Click image for larger version

Name:	iDhIeGI.png
Views:	1
Size:	303.0 KB
ID:	1114298

    Click image for larger version

Name:	OO7BDc5.png
Views:	1
Size:	243.6 KB
ID:	1114299

    Here's the error:

    Click image for larger version

Name:	owhsZrE.png
Views:	1
Size:	139.8 KB
ID:	1114300

    Leave a comment:


  • replied
    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..




    .
    Last edited by tozan; 08-22-2016, 11:54 AM.

    Leave a comment:


  • replied
    its the missing edge after the "AttachActorToComponet" node... didnt think anything was needed after that though..

    Leave a comment:


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

    Leave a comment:


  • replied
    Originally posted by EniGmaa View Post
    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"
    Can you show the rest of your first image that you posted up there? The blueprint one.

    Leave a comment:


  • replied
    Originally posted by EniGmaa View Post
    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"
    Thank you very much, I'll try this tomorrow when I'm with the project and I'll post the results here.

    Leave a comment:


  • replied
    Originally posted by Ozcorps View Post
    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"

    Leave a comment:


  • replied
    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 =)

    Leave a comment:


  • replied
    ok so first spawn youre weapons like normal .

    Click image for larger version

Name:	90f805cbd945464f935c71f2c03facf9.png
Views:	1
Size:	197.5 KB
ID:	1114049

    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

    Click image for larger version

Name:	ccf6707c5f4840b49c68a001ee354e57.png
Views:	1
Size:	229.3 KB
ID:	1114050

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

    Click image for larger version

Name:	3287a0d43cd94564ae5352d587b702cb.png
Views:	1
Size:	146.4 KB
ID:	1114051

    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
    Last edited by EniGmaa; 08-19-2016, 02:33 PM.

    Leave a comment:


  • replied
    Originally posted by Ozcorps View Post
    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.

    Leave a comment:


  • replied
    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...

    Leave a comment:


  • replied
    Originally posted by EniGmaa View Post
    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.

    Leave a comment:

Working...
X