Announcement

Collapse
No announcement yet.

Weird Event Tick behaviour

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

    Weird Event Tick behaviour

    Hi everyone. I'm going mad at this thing and I'd like to get some help on it.
    This setup is simply meant to switch a boolean variable from true to false and viceversa everytime I press a button. It works fine if it's on my Blueprint Level or my Player Controller, it doesn't work when it's on my Character Blueprint and I can't figure out why.
    When it's on my character it gives mixed true-false results.

    Blueprint:
    Click image for larger version

Name:	character.PNG
Views:	1
Size:	129.2 KB
ID:	1225827

    Beginning state:
    Click image for larger version

Name:	false.PNG
Views:	1
Size:	49.8 KB
ID:	1225828

    After input pressed (it should just print True):
    Click image for larger version

Name:	true.PNG
Views:	1
Size:	28.9 KB
ID:	1225829

    What am I missing?

    #2
    Change that input action to be :

    get bool-->not(inverts value)-->set bool with the not'd value.

    EDIT: Also run a search through the BP for the variable and see if something else is messing with it's value.
    Last edited by IronicParadox; 07-27-2017, 08:22 AM.

    Comment


      #3
      Maybe you've got two characters? Any non-possessed characters won't print true.

      Comment


        #4
        Ok, after 2 hours I think I located the issue. Since I am using level streaming and I'm spawning my character by using TargetPoints in every level it seems like I am not spawning my character blueprint but some copy of it instead (it still seems weird to me because the spawned character have all my functionalities...). I think I'm getting close to a solution. Thanks IronicParadox and thanks cyaoeu for pointing me toward the right direction.

        This was the method I was using to spawn the character (I thought it was fine since I never got any issue in my tests):
        Click image for larger version

Name:	target.PNG
Views:	1
Size:	97.3 KB
ID:	1131605

        EDIT: Yep, that was the problem. I fixed it using this instead and now everything's working as intended :
        Click image for larger version

Name:	fix.PNG
Views:	1
Size:	59.9 KB
ID:	1131606
        Last edited by Deikhin; 07-27-2017, 10:05 AM. Reason: solution found

        Comment

        Working...
        X