Something strange with conditions.

Discussion and feedback on Construct 2

Post » Sun Oct 09, 2016 9:43 am

Hello, this capx something happens that I do not understand.

For example:
Why the first red object is destroyed when the tween ends ?.
But the text has not been written with the word "NOW".

Besides that, the first condition:
player.x <= 11 * 16
It remains true, therefore there is no reason to run the condition:
On liteTween end

https://dl.dropboxusercontent.com/u/60803633/testDestroy.capx

Image

What happens here ?, any idea ?.
B
31
S
13
G
21
Posts: 843
Reputation: 14,691

Post » Sun Oct 09, 2016 11:33 am

I could be wrong, like totally wrong, but I'd think it is because it's a trigger event and not a regular event under the else. Maybe something the plugin maker or @Ashley could explain, as I never used Else with a trigger under it.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150

Post » Sun Oct 09, 2016 12:02 pm

It's easier to help if you don't use third-party addons, since 1) I don't have to go and find the right addon, which often ends up being a different and incompatible version to the one you used, and 2) it eliminates the chance the problem is caused by the third-party addon.

Just looking at the picture, I don't think that trigger is going to work like you think. Triggers in subevents check all their parent events are true, but the "else" is checked on its own without referring to previous events in that case, so it probably doesn't do what you want.
Scirra Founder
B
402
S
238
G
89
Posts: 24,613
Reputation: 195,993

Post » Sun Oct 09, 2016 1:05 pm

Tested and working using lastest beta (r237) with liteTween 1.7 as the only installed 3rd party behaviour.
Image
Banned User
B
17
S
7
G
24
Posts: 388
Reputation: 14,494

Post » Sun Oct 09, 2016 4:20 pm

Ashley wrote:Just looking at the picture, I don't think that trigger is going to work like you think. Triggers in subevents check all their parent events are true, but the "else" is checked on its own without referring to previous events in that case, so it probably doesn't do what you want.


I understand this but I did so to remove code and put the least.

I will comment with the author of the plugin.

Thank you all come back with news.
B
31
S
13
G
21
Posts: 843
Reputation: 14,691

Post » Sun Oct 09, 2016 5:37 pm

It's working fine... Are you using the latest version of LiteTween ?
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011

Post » Sun Oct 09, 2016 6:10 pm

chadorireborn wrote:It's working fine... Are you using the latest version of LiteTween ?


Of course, use the latest version (1.7 liteTween and Release 237 of C2) and the fault exists.

Are you sure you understand the failure to which I refer?
B
31
S
13
G
21
Posts: 843
Reputation: 14,691

Post » Mon Oct 10, 2016 6:04 am

Mirlas wrote:
chadorireborn wrote:It's working fine... Are you using the latest version of LiteTween ?


Of course, use the latest version (1.7 liteTween and Release 237 of C2) and the fault exists.

Are you sure you understand the failure to which I refer?



Yes. I do understand. I'm not as retarded as you think. But I'm not perfect so correct me if I'm wrong:

The events are running well.

Proof: (The "Now" does show)
Image

If you are asking why the red circles aren't destroyed. I'ts simply because at the time that the 3rd Else If (Condition) is ran, all the red circles have already finished running litetween. It's a subevent trigger, so the else must run first before the Litetween ends.

I have asked your liteTween version since the author (lunarray) fixed many bugs on the older versions and it might be the reason why you're having problems.

I'm also using LiteTween v1.7 & r237 Beta Release.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011

Post » Mon Oct 10, 2016 9:10 am

chadorireborn wrote:Yes. I do understand. I'm not as retarded as you think. But I'm not perfect so correct me if I'm wrong:


Those thoughts were never in my mind.

chadorireborn wrote:The events are running well.

Proof: (The "Now" does show)
Image

If you are asking why the red circles aren't destroyed. I'ts simply because at the time that the 3rd Else If (Condition) is ran, all the red circles have already finished running litetween. It's a subevent trigger, so the else must run first before the Litetween ends.

I have asked your liteTween version since the author (lunarray) fixed many bugs on the older versions and it might be the reason why you're having problems.

I'm also using LiteTween v1.7 & r237 Beta Release.


Regarding the rest, the question is:
Why is the first red object is destroyed when the tween finishes playing ?.
All this happens without pressing any key.

Image

I have the latest version (liteTween) of the official thread, the downloaded yesterday to make sure I have the latest version.
B
31
S
13
G
21
Posts: 843
Reputation: 14,691

Post » Mon Oct 10, 2016 9:53 am

My bad. I was so focused on the TEXT object & the 3rd Red Circle that I ignored the other two. O,o I didn't notice that the 2 events don't have destroy actions.

But still, I've read Ashley's post about the 'else' doesn't pick objects. So I never use 'else' on my event whenever it requires picking especially triggers.
It's not my place to tell this but it's like you are expecting 'else' to be more than it is. It's simply just returns true or false from a past event so in a sub-event trigger things go crazy. Then again, forget what I said, I may be wrong anyway.
The Things you can create is only limited by your imagination. If you don't have the skills then use your motivation as a natural force to exceed all expectations. Chadori RebornXD
B
66
S
22
G
90
Posts: 1,125
Reputation: 60,011

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 7 guests