How do I pass a family to a function as a param

0 favourites
  • 5 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • I know you can only use text or numbers as parameters to function calls. I just want to know if this is something

    we all live with or if there is some way to get around it. In my example I pass a string that is really the name of a family or object. I then if else on it to get a match.

    Is this the best way to do this?

    Thanks for your time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't know about that, but I know that's not how you use "Else". The else must be together with other conditions, or on its own.

    Though in your events here, it's not required at all

  • Thanks 7Soul. I just click here and there and hit X til an Else comes up. So what you are saying is: I want the Else at the top of a complete box and the action that appears on the same level as that else is that action that happens when that else is true? I read the section on understanding events, but the relative size of the boxes is never explained.

    But then you say:

    "The else must be together with other conditions, or on its own."

    My else statements are on their own. By together I assume you mean "in the same box".

    thanks for your time.

  • This is how your events would look like with else in the right places (its a quick photoshop edit of your image, so ignore that the conditions have multiple actions )

    [quote:1hktlzsk]My else statements are on their own. By together I assume you mean "in the same box".

    Yeah. If they are alone in their own box and have no actions, then they are useless. They must either have some more conditions on the same box, or be alone and have actions

  • Okay, thanks for the help 7Soul.

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