One family member responds to conditions, the other doesn't...?

0 favourites
  • 7 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Hey There,

    Here are my events:

    i.imgur.com/YyhqGKf.png

    I have two different "people" objects in my family. I added a second one after I wrote these events.

    The first person object responds fine, they will simply turn around when they hit the boundary, but the second person object will not.

    I don't know why. I thought if I simply put my second person into my f_People family, they would respond accordingly, but no the second person's status string variable does not change. Can anyone please help me with this?

  • Is the string variable a family variable?

  • Yes, it is.

  • It should work, unless your second person has a status in the variable that does not match any of the ones on your screenshot.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Let me show you more of my project.

    Here are the members of the f_people family:

    i.imgur.com/T1DSRVp.png

    Both members have this instance variables. It is blank because it can contain different values for each member:

    i.imgur.com/lJiDx5i.png

    In the case of my original screenshot, my criminal should change his status according to the family instance variable, but it's not, so what am I missing?

    When I run the project, his status is "Walking Right" when he hits the "People_Boundary_Right" object, just like my civilian is doing, except my civilian is not getting stuck, he is changing his status, but my criminal is not. I don't understand.

  • if you tried just this mechanic in a new project, you would see that it works.

    There must be something else in your project that we can not see on the screenshots. Is there another event that changes back the status of your character?

  • Ahh, Kriand, I knew I was doing something wrong somewhere:

    I had this in a completely different group:

    i.imgur.com/wNufnCc.png

    The else statement was constantly forcing my criminal to keep going right.

    Thanks for helping, Kriand! I'm sorry for wasting your time. It goes to show I've had a long day in Construct. I might have a break.

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