this one is hard to describe and probably hard to believe but I have now for 5 hours tried to work out what is happening without success, so I thought it must be a bug and maybe someone else knows about it.
Sorry I can’t show exactly what is happening because I have some very project specific functions. That doesn’t matter though because if I am correct then this is super strange whatever I do down stream.
I have this variable called ‘HitLevel’ that I calculate on component hit based off velocity vectors.
I Print this value just before comparing with it and it prints as 1. (it really does)
Later downstream I print some more text to verify that I get that far.
I then try to trigger a montage animation. But when I have that check in the picture in there, it just won’t play. It does print the debug text I just mentioned immediately preceeding the montage setoff.
Super strangely if I don’t have the check with ‘HitLevel’, if I dis-connect that variable and just type in ‘1’, as in 1>0, it then plays the animation. (and prints the message of course)
Two things are very strange.
Why does it not play the animation even if it gets through the variable check, proved by my printing the second message?
And why would it be doing two different things when I just do a check with a variable. (it shouldn’t as I test before with the print). I don’t use that variable in the animation functions, but also I don’t change the variable.
This is driving me crazy! Please say that you have an idea what’s happening?
I have a few questions for you that will help narrow down what issue it is that you are experiencing.
Quick questions:
Can you reproduce this issue in a clean project?
If so, could you provide a detailed list of steps to reproduce this issue on our end?
Could you provide screen shots of any blueprints/settings that may be involved with this issue?
Could you try placing a break point on the node that you think is giving you an issue and right click watch value to make sure that you are getting the correct results?
(1). I’ll try later but my main issue is to get a solution or workaround for my own project.
(3). If all else fails I will. There’s a lot and it doesn’t look pretty.
(4). Break point is that called ‘Watch this Value’ in Blueprints? To test this I need to build and run over two LAN connected computers. Can I read the breakpoint off a built/cooked game?
EDIT: I’m reading about adding breakpoints. But it seems to say I can only use these with the editor? That wouldn’t work for me as I need to test this over LAN. It is a 2 player game for VR.
I just discovered that the problem only ocurs on the Client machine (im using listen server - client). Not sure why I didn’t think to try this before.
It is still the same perplexing problem, why is is failing just because I do a (successful) check of that int variable?
Here’s an image showing how I print out the var on just the client and just for that Pawn that is meant to get the animation triggered on it. (works on Server).
So it still prints as ‘1’ and DOES get past the check but anim does not get triggered. (it does without the var check)
So here are two more pictures I am not sure how I can show you more clearly than this!
Note that when running the game like in the picture here that doesn’t work it still prints out the “SHOULD TRIGGER STAGGER” message from above previous picture client_err2.png
Hmm…getting a bit closer. This one does not make it work.
Would you be able to derive an explanation for a situation that would result in these combined behaviours?
I have a probably somewhat un-orthodox hit mechanism going upstream. Maybe it has to do with that although I can’t see how that would explain the behaviour in previous image ‘client_trig3.png’?
Would it be possible for you to provide a zipped down copy of your project so that I could take a closer look? If you would like to provide it privately, you could do so by sending it to me in a private message on the forums via a google drive or drop box link.
I am just trying running the cooked game on my 2nd machine and playing as client in editor on my dev machine and so hoping that the debug tools could work that way.
It prints watched values but not making me any wiser. Either it prints 1 and True, which is not the effect I am getting.
Or when I am using the dropdown menu to switch to the other character it prints -1 and True. Does it not update properly by just switching in the dropdown?
(of course the effect I am getting is of a False but none of them say False)
Aha I’m pretty sure I have found my problem!
Though I haven’t got the fix yet I’m super happy to at least have identified the issue. When I force the last bit, the one we have been looking at, to only execute only on the client it just doesn’t play at all. It’s something to do with it not being the owner of the client and attempting to do a RPC I reckon.
When it was working in the example above when setting the var directly it was actually playing and replicating the animation off the server.
When I thought I made it work I actually didn’t and it kept me thinking in the wrong way.
I’ll change how I do this tomorrow but I’m pretty sure there won’t be any trouble.