Announcement

Collapse
No announcement yet.

Inventory problem Error (Accessed None 'InventoryWidget'...)

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

    Inventory problem Error (Accessed None 'InventoryWidget'...)

    Hello, basically I'm trying to add a inventory system to my game, but I'm not very good at scripting so I am trying to replicate this inventory system from this video;

    https://www.youtube.com/watch?v=wReJIq_Fev0

    Everything seemed to work, until I got to epizode 6, Errors are coming up when I try to open my Inventory. From what it says in the error, something is wrong with this blueprint (at least I'm guessing) I really need a fix for this, I would really appreciate someone's help. thanks.

    Click image for larger version

Name:	Error.jpg
Views:	1
Size:	15.3 KB
ID:	1170395

    Click image for larger version

Name:	MyCharacter.jpg
Views:	1
Size:	441.1 KB
ID:	1170397

    Click image for larger version

Name:	InventoryWidget.jpg
Views:	1
Size:	326.1 KB
ID:	1170396

    #2
    I think I've found the problem, I do also try to explain why it happens:
    In the ThirdPersonCharacter you did a branch with the condition Can Move. So you press the button for your inventory and it goes to the branch. Now the Exec goes to false, because the Can Move boolean is set to false at default. You execute the Allow Movement Event correctly and then you want to remove the "Inventory Widget" from parrent. This is not possible cause the "Inventory Widget" variable isn't defined yet, cause you haven't executed the Can Move true path (from the branch), where you set the variable, yet.

    So you just have to set Can Move to true by default, I do also think thats logical, cause you can move when you start playing.
    I'm not sure whether you did it already or not, but you habe to set the Can Move boolean to true in the custom Event 'Allow Movement' and to false in 'Disallow Movement'.


    So short: Just click the Can Move variable and set it's default to true, it should work now
    Last edited by LimSHulK; 01-17-2016, 11:18 AM. Reason: Just corrected some writing mistakes
    Thanks 4 your time.
    LimSHulK

    Comment


      #3
      Wow that was easy. Thanks

      Comment


        #4
        Originally posted by Sebapler View Post
        Wow that was easy. Thanks
        No problem Sometimes there are so small problems like this, and nothing from that you´ve coded works
        Thanks 4 your time.
        LimSHulK

        Comment

        Working...
        X