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

Just started using Construct 2? Post your questions here

Post » Thu Nov 13, 2014 7:44 pm

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.
You do not have the required permissions to view the files attached to this post.
B
33
S
8
G
3
Posts: 169
Reputation: 3,280

Post » Fri Nov 14, 2014 12:36 pm

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.

Image

Though in your events here, it's not required at all
B
83
S
22
G
15
Posts: 1,039
Reputation: 15,219

Post » Fri Nov 14, 2014 1:21 pm

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.
B
33
S
8
G
3
Posts: 169
Reputation: 3,280

Post » Fri Nov 14, 2014 5:51 pm

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 :P)
Image

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
B
83
S
22
G
15
Posts: 1,039
Reputation: 15,219

Post » Fri Nov 14, 2014 6:02 pm

Okay, thanks for the help 7Soul.
B
33
S
8
G
3
Posts: 169
Reputation: 3,280


Return to Beginner's Questions

Who is online

Users browsing this forum: plinkie and 0 guests