Announcement

Collapse
No announcement yet.

Setting boolean state to disable actions

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

    Setting boolean state to disable actions

    Hi,

    I'm trying to get my head around how this works, I was wondering if someone could explain it to me?

    Similar to this thread: https://answers.unrealengine.com/que...ml?sort=oldest I'd like to use a boolean to check whether another action can fire, for example if I'm jumping, I want to disable the attack action. I understand that a bool plugs into the condition into the branch, then I guess I can reference it elsewhere using 'set'?

    I just can't seem to understand how to achieve this or how this works? If anyone can explain it, provide an image, or even find a video on the subject (I've had no luck) that would help my stupid brain a bunch. This has been driving me nuts. Thanks!

    #2
    Originally posted by lilwinterling View Post
    Hi,

    I'm trying to get my head around how this works, I was wondering if someone could explain it to me?

    Similar to this thread: https://answers.unrealengine.com/que...ml?sort=oldest I'd like to use a boolean to check whether another action can fire, for example if I'm jumping, I want to disable the attack action. I understand that a bool plugs into the condition into the branch, then I guess I can reference it elsewhere using 'set'?

    I just can't seem to understand how to achieve this or how this works? If anyone can explain it, provide an image, or even find a video on the subject (I've had no luck) that would help my stupid brain a bunch. This has been driving me nuts. Thanks!


    Hi man,

    You can refere to a boolean variable from almost everywhere using "Get".
    For example a player can have a boolan, and any other player or enemy actor can read it with some work and set-up.

    You can easily place a check in any "event" and function .
    As you can see in this example , Two custom event set up a boolean to true and false,
    During the game, if the boolean is set to 1, the player is unable to change his Z.
    You can do this and check if the Player can do an action like jump, if the boolean is set.
    You can do this using also enumerators, or statemachines ...


    Click image for larger version

Name:	Z_Constrain_Actor.png
Views:	46
Size:	185.8 KB
ID:	1797360

    Comment


      #3
      Originally posted by Est_engine View Post



      Hi man,

      You can refere to a boolean variable from almost everywhere using "Get".
      For example a player can have a boolan, and any other player or enemy actor can read it with some work and set-up.

      You can easily place a check in any "event" and function .
      As you can see in this example , Two custom event set up a boolean to true and false,
      During the game, if the boolean is set to 1, the player is unable to change his Z.
      You can do this and check if the Player can do an action like jump, if the boolean is set.
      You can do this using also enumerators, or statemachines ...


      Click image for larger version

Name:	Z_Constrain_Actor.png
Views:	46
Size:	185.8 KB
ID:	1797360
      Thank you so much! Just got it working finally

      Comment

      Working...
      X