How do I enter an instance variable to an object?

Not favoritedFavorited Favorited 0 favourites
  • 6 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi, I am very new to Construct 3 and I have a free account at the moment and I've been trying to get an instance variable added to my player sprite, which works but then when I try and create an action with that variable, I get an error message stating that there is no variable to add.. can someone please help with this? I have attached 2 images to show what I have done and what I am getting. Thanks in advance.

  • You cannot compare a boolean variable the way you are trying. Booleans are only true or false.

    Try "Is boolean instance variable set" instead, or use a different type of variable to be able to compare.

  • Yea Krypto is right,

    What you did wrong is selecting the wrong option on the event sheet.

    Don't select "Compare instance variable" because this only codes for a number or a string

    You should select "Is boolean instance variable set" for this codes for a boolean only.

    Here's a screenshot to show you which option you should select:

    If you have further issues be sure to ask.

    I'm always here to help at anytime :D

    Regards,

    Radkampfwagen

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I suggest using a number variable instead, it's easier. 0=false, 1=true.

  • Superb! Thank you for that. Seems to work easier.

  • And with a number variable you can use more than two values if needed! :)

    -1=undefined

    0=false

    0.5=maybe

    1=true

    2=definitely true

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)