How do I group condictions?

Get help using Construct 2

Post » Thu Oct 22, 2015 10:09 am

Hello guys! :)

One question : does it's possible to group condictions like we can do as actions with variablers?

I explain it better : I have same condictions that I repeat many and many times...It can be helpful to group in one thing like one variable that control actions...

Thank you very much in advance! :)
B
4
Posts: 18
Reputation: 236

Post » Thu Oct 22, 2015 10:16 am

mirko26 wrote:Hello guys! :)

One question : does it's possible to group condictions like we can do as actions with variablers?

I explain it better : I have same condictions that I repeat many and many times...It can be helpful to group in one thing like one variable that control actions...

Thank you very much in advance! :)


Would Functions be what you are after using?
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,413
Reputation: 59,510

Post » Thu Oct 22, 2015 2:45 pm

now I try Functions....Thx a lot @Zenox98 ! :)
B
4
Posts: 18
Reputation: 236

Post » Thu Oct 22, 2015 9:32 pm

mh...I tried Functions, but the problem is I need to group condictions, not actions...Maybe I wrong something...
B
4
Posts: 18
Reputation: 236

Post » Thu Oct 22, 2015 9:49 pm

You can store conditions into functions as well.
B
12
S
7
G
7
Posts: 450
Reputation: 4,276

Post » Sat Oct 24, 2015 12:48 am

How group condictions in one function?
B
4
Posts: 18
Reputation: 236

Post » Sat Oct 24, 2015 1:11 am

Could you explain what exactly you mean by grouping conditions?
Your first question seemed to suggest you needed something like the function-object..

Maybe there is a miscommunication..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Oct 24, 2015 10:48 am

Sorry, probably I can't explain the problem : Well...I don't care if I use functions or else...
I have a lot of events and, for each events, I have many condictions ( that I repeat the same many times )...My questions is if it's possible to write all these condictions one time and call them for the other events...More or less like we can do with variables, but variables call actions not condictions...

Image

Here, for example, there are a lot of inverted condictions...all these condictions are repeted for a lot of events...it's possible to have one line to call of them?

Hope it's clear...

Thank you in advance :)
B
4
Posts: 18
Reputation: 236

Post » Sat Oct 24, 2015 10:50 am

mirko26 wrote:Sorry, probably I can't explain the problem : Well...I don't care if I use functions or else...
I have a lot of events and, for each events, I have many condictions ( that I repeat the same many times )...My questions is if it's possible to write all these condictions one time and call them for the other events...More or less like we can do with variables, but variables call actions not condictions...

Image

Here, for example, there are a lot of inverted condictions...all these condictions are repeted for a lot of events...it's possible to have one line to call of them?

Hope it's clear...

Thank you in advance :)


I'm sorry, but the picture isn't showing..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Oct 24, 2015 1:36 pm

I can't see the image too.

If I understand right you have many conditions in a single event like this for example:

Mouse cursor is over Sprite
is animation "run" Playing
Sprite2 Y < 150

If that's the case, then the first time you use these conditions together, add an action that sets a global variable. Like MyConditions=1
Then you can use a single condition:
System - MyConditions=1 --> ...(trigger some actions)

At the end of the actions set the variable back to zero.
B
13
S
5
G
1
Posts: 116
Reputation: 1,805

Next

Return to How do I....?

Who is online

Users browsing this forum: bclikesyou, brunopalermo, kellehk, ST314 and 30 guests