How do I free a stuck sprite in a solid object

Get help using Construct 2

Post » Tue Jul 14, 2015 7:47 pm

GamerGon wrote:
LittleStain wrote:To you and me it's worthless, for beginners it shows what the condition is (an empty event/condition can confuse some)..
Removing it makes no difference whatsoever..


Agree, but it doesn't mean that they can't understand it :)

About the position of the action... now that I think about it a little more @LittleStain, I'm pretty sure that lines 12 & 13 are not necessary executed secuencially because they don't belong to the same action and they are at the same place from the condition hierarchically speaking. Am I right @Ashley?
If this is right... placing the "Move 5 pixels..." in line 11 or 13 should be the same so it can cause the angle isn't know at right moment.


As I understand events are read and executed from top to bottom..
Because I'd like the angle to be known before setting it, placing the event setting the angle above the one moving at that angle seems like a logical choice..
If I put the action in event 11, the first tick the overlapping condition is true the action would take place using the old value of the instance variable..
Now at the first tick the overlapping condition is true, first the new value is set (triggered once) and after that it is used in the second action..
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 » Tue Jul 14, 2015 8:08 pm

LittleStain wrote:
GamerGon wrote:
LittleStain wrote:To you and me it's worthless, for beginners it shows what the condition is (an empty event/condition can confuse some)..
Removing it makes no difference whatsoever..


Agree, but it doesn't mean that they can't understand it :)

About the position of the action... now that I think about it a little more @LittleStain, I'm pretty sure that lines 12 & 13 are not necessary executed secuencially because they don't belong to the same action and they are at the same place from the condition hierarchically speaking. Am I right @Ashley?
If this is right... placing the "Move 5 pixels..." in line 11 or 13 should be the same so it can cause the angle isn't know at right moment.


As I understand events are read and executed from top to bottom..
Because I'd like the angle to be known before setting it, placing the event setting the angle above the one moving at that angle seems like a logical choice..
If I put the action in event 11, the first tick the overlapping condition is true the action would take place using the old value of the instance variable..
Now at the first tick the overlapping condition is true, first the new value is set (triggered once) and after that it is used in the second action..


@LittleStain I do understand the logic of what @Bl4ckSh33p is trying to do... He has to know the angle before the action "Move 5 pixels...", that isn't in discussion.

What I'm wondering if they are always executed secuentially by Construct 2.
I had this doubt on one of my projects when some things triggered in a bad way, so I did a proof of concept and it seems that two subconditions at the same position hierarchically speaking below another condition are not necessary evaluated secuentially.
Last edited by GamerGon on Tue Jul 14, 2015 8:09 pm, edited 1 time in total.
Lead developer at Octeto Studios
Visit our portfolio at: http://www.octetostudios.com/ :)
Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,614

Post » Tue Jul 14, 2015 8:09 pm

@Ashley please! any comments :)
Lead developer at Octeto Studios
Visit our portfolio at: http://www.octetostudios.com/ :)
Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,614

Post » Tue Jul 14, 2015 8:25 pm

... and if they are evaluated secuentially, it doesn't mean that the actions inside of those conditions will be executed secuentially from condition 1 to 2... actions from the first condition can be executed after actions from the second condition. For example, condition 1 can have 50 actions and condition 2 can have 1 action... that 1 action sure will be executed before all the 50 actions from the condition 1.
Lead developer at Octeto Studios
Visit our portfolio at: http://www.octetostudios.com/ :)
Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,614

Post » Wed Jul 15, 2015 10:16 am

Events are always evaluated sequentially. The only way you can run an event outside of top-to-bottom order is with a trigger (such as a function call). Within each event, the conditions are tested from top to bottom. If they are all true, and only after all conditions have been tested, the actions are then run top to bottom. It's pretty simple, it all runs in order!
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Mon Jul 20, 2015 2:19 pm

@Ashley, even in this situation?

Condition 1

- SubCondition A
-- Action A1
-- Action A2
-- Action A3
-- Action A4
-- ...
-- Action A1000

- SubCondition B
-- Action B1
-- Action B2
-- Action B3

SubCondition A & SubCondition B are in the same hierarchy level.

SubCondition B is evaluated after Action A1000 execution?
Lead developer at Octeto Studios
Visit our portfolio at: http://www.octetostudios.com/ :)
Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,614

Post » Mon Jul 20, 2015 7:19 pm

Yep.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

Post » Mon Jul 20, 2015 7:36 pm

@Ashley what about if we include multiple eventsheet?
All event in eventsheet1 then all in eventsheet2 and so on?
Image Image
B
25
S
14
G
136
Posts: 876
Reputation: 71,005

Post » Mon Jul 20, 2015 10:16 pm

Thank you! :)
Lead developer at Octeto Studios
Visit our portfolio at: http://www.octetostudios.com/ :)
Facebook || Twitter || Youtube
B
37
S
7
G
5
Posts: 217
Reputation: 5,614

Post » Tue Jul 21, 2015 9:41 am

Event sheet includes are also run the same way, at the point of the include, as if the included sheet were copied and pasted in to where the include is.
Scirra Founder
B
397
S
236
G
88
Posts: 24,423
Reputation: 194,560

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests