x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Accessed None error from node [RESOLVED]

Hi everyone. After many days beating my head on the wall, I see no other solution than to ask competent people to help me with my problem. If anybody can explain to me what I'm doing wrong, I would be very grateful. First of all, you need to understand it's my first try with UE, I try to understand the fundamentals by myself, also the methods used are inevitably strange, and certainly not the simplest. But I do my best with what I can understand.

So this is my problem: After creating a draw/sheath sword system, when I test it and draw the sword, everything is fine.. But when I want to sheath, my character can't detach the sword from his hand and loop the same animation until I quit the game. After back ton UE, I get an "Accessed None error from node", an error that directs me to this node precisely:

alt text

  • xbot = My player character

  • I use too many booleans maybe, but some of them are used to trig each steps of states machine in Animation BP

  • I'm VERY sorry for the mess, if needed I can reorganize for better reading

For better explaination, here is the draw/sheath system I use: alt text

I think I understood that using Event Tick was a bad idea, so in case the problem came from there, here it is alt text

To talk again about the node error, what I didn't understand is when I reduce the delay just before it (from 0.5 to 0.35), the error disappears... To reappear again randomly after 3, 5, 10 or whatever the number of sheathing the sword alt text

I hope someone can have the faith to read and understand my problemes and screenshots. Thanks in advance,

Product Version: UE 4.21
Tags:
picksword.png (180.3 kB)
tick.png (154.7 kB)
more ▼

asked Nov 27 '18 at 11:04 PM in Blueprint Scripting

avatar image

Rejem Mjude
11 1 3

avatar image ThompsonN13 Nov 27 '18 at 11:25 PM

just going by the error type and the node you indicated i would say that your issue lies in either the sword or xbot variable not being set. a access none error usually results from trying to get a variable that hasnt been set.

avatar image Rejem Mjude Nov 28 '18 at 11:04 AM

Thanks for your answer

If my xbot or sword variables weren't set, the error should be appear everytime, isn't it? Or as I said it only appear randomly after some Sheath action, and every time if I set, just before the Attach to component node, the delay at > 0.35s

avatar image Tuerer Nov 28 '18 at 10:00 AM

Something tells me that the issue might be with the EndOverlap. Try double checking the sword's collision preset to make sure that End Overlap function isn't invoked when not needed. Might happen that sometimes that End Overlap assigns null to your Sword when it mustn't be null.
I'm not sure if the problem is really there, I'm just saying what my guts tell me =)

avatar image Rejem Mjude Nov 28 '18 at 10:12 AM

I'm not sure to understand what's your suggest.. Here is my Sword BP: alt text And for the info here is the positionning of the box collision with the sword: alt text

unless I did not understand what "collision presets" is?

sword.png (170.7 kB)
sworbox.png (507.9 kB)
avatar image Tuerer Nov 28 '18 at 10:15 AM

You never check what the Sword is overlapping with. What I mean is you can run close to a wall, then you get away from it, the Sword overlapping ends and there you go, your Sword is Null.
Well, not the Sword, but the variable that you use for attaching.

avatar image Rejem Mjude Nov 28 '18 at 10:21 AM

Oooooh very interesting!! thanks you! but, isn't precisely the function of "cast_to_BP_redcharac" to verify that the event is triggered only in the presence of BP_Redcharac? (Redcharac is the BP where is the xbot skeletal mesh)

avatar image Tuerer Nov 28 '18 at 10:31 AM

Yes, that clears things up, and yes, that's right. But still, your collision box is quite large, you should watch for some unintended overlappings with Redcharac. You can connect that Sword variable to PrintString and print its value every tick, and you'll see if at some point in turns to Null.

avatar image Rejem Mjude Nov 28 '18 at 10:32 AM

Very good idea, I go try that immediatly

avatar image Rejem Mjude Nov 28 '18 at 10:47 AM

So... Unfortunately, no "null" value in the Tick print of Sword value. For better report I've recorded this: https://www.youtube.com/watch?v=rCjUB3dhims&feature=youtu.be

avatar image Tuerer Nov 28 '18 at 11:48 AM

But those empty lines printed between the name of the sword. Those are nothing else than nulls - nothing. So at some point your variable get nulled and it breaks your sequence.

avatar image Rejem Mjude Nov 28 '18 at 11:59 AM

Oh I understand now. I expected to see written "null" instead of just nothing... But why the value of the variable change to nothing before changing again to the correct value? What can I do for correcting this?

avatar image Tuerer Nov 28 '18 at 12:09 PM

What exactly are you using the trigger box for? Just to pick up the Sword when the Character gets close to it? Why do you need the End Overlap event? What if you set a bool Is Picked Up for the sword, set it to True when the Character picks it up, and to False when you drop it. And you only fire the Begin Overlap event if the Is Picked Up bool is False.
Anyway, I really don't see why you would nullify your Sword variable for anything other then dropping a sword. Correct me if I'm wrong.

avatar image Rejem Mjude Nov 28 '18 at 12:16 PM

The trigger box is for allowing player to use the Action button for picking the sword, if he don't press Action, he did'nt pick the sword. And if he press Action somewhere else than in the trigger box, nothing happens. Today I've one sword in game, but in the future I want to allow the player to drop his sword and pick another one.

But maybe I can nullify the value only when dropping is needed? So you think the probleme come from here? alt text

picksword2.png (168.4 kB)
avatar image Tuerer Nov 28 '18 at 12:25 PM

Yes, I think so. I think you should remove the End Overlap event completely and just set a custom function that will be invoked when the sword is dropped. This should eliminate the error that you receive, and then you'll see how your animation will work.
Basically, you don't even need the On Begin Overlap event if you use the action key to pick up the sword. On key press, you can simply check ONCE if the Craracter is overlapping the Sword's Collision Box, and pick up the sword if it does.

avatar image Rejem Mjude Nov 28 '18 at 02:36 PM

It's works! You are right, I just deleted the End Overlap node from my character BP, and no more error whatever the delay I put before the attach to component!

Thanks you very much for your time and your help, and thanks you for being pedagogue, I could understand what you asked me to do, and so progress in my knowledge.

I noted the suggestion that you make me concerning waiting for action press before check if my BP are in collision box. I think I understood the idea and I will apply it tonight because it seems to me a very good idea.

Thanks you again for your help!

avatar image Tuerer Nov 28 '18 at 02:41 PM

You're welcome, glad I could be of help.
Please take some time to write any kind of an answer and mark the question as resolved.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

So @Tuerer brought me the answer, thanks to him:

you should remove the End Overlap event completely and just set a custom function that will be invoked when the sword is dropped. This should eliminate the error that you receive, and then you'll see how your animation will work.

more ▼

answered Nov 28 '18 at 07:44 PM

avatar image

Rejem Mjude
11 1 3

avatar image Tuerer Nov 28 '18 at 07:54 PM

Thanks =)
There's a tick to the left of the answer "Accept this answer as correct" ;)

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question