Picking problem

For questions about using Classic.

Post » Sun Jan 30, 2011 2:01 pm

[quote:gkcmx6ur]But, well, why can't I access a pv then until the next tick? Doesn't make sense.[/quote:gkcmx6ur]

You can, if the action is associated with the object.
You can do that if its within that particular top tier event, or its subevent.
Note a top tier event doesn't necessarily have to be the first event.
A top tier event can be a condition's sub event.
Its basically the same as the first event if its not associated with a preceding event.

Does that make sense?
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sun Jan 30, 2011 8:46 pm

[quote="newt":3258oobi][quote:3258oobi]But, well, why can't I access a pv then until the next tick? Doesn't make sense.[/quote:3258oobi]

You can, if the action is associated with the object.
You can do that if its within that particular top tier event, or its subevent.
Note a top tier event doesn't necessarily have to be the first event.
A top tier event can be a condition's sub event.
Its basically the same as the first event if its not associated with a preceding event.

Does that make sense?[/quote:3258oobi]
newt, did you try my example? Because all you say is tested in my example and it does NOT work.

I, too, know what I am saying, although it seems to be ignored...
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sun Jan 30, 2011 9:49 pm

I know what its like to be ignored, but its worse to be misunderstood.

[url:1bcfrxq3]http://dl.dropbox.com/u/666516/pvsubsubevent.cap[/url:1bcfrxq3]
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sun Jan 30, 2011 10:36 pm

In an effort to nail down the rules:

1. When an object is created it becomes the only picked object of that type for the actions below it and in sub-events of the event the object was created in.
2. The new object can't be picked in the following events with the same nesting level as the event it was created in (unless it was created in a top level event).
3. Once a new toplevel event is reached the new object can be picked like normal.

To illustrate:

http://dl.dropbox.com/u/5426011/fixed/C ... icking.cap
B
79
S
24
G
53
Posts: 4,728
Reputation: 40,219

Post » Sun Jan 30, 2011 10:46 pm

Thanks for the picture R0J0, that sums it up nicely. For the record, it used to be that it wouldn't be pickable until the next tick - a fix a few versions ago made it the next top level event, but due to the design of the engine, it's very tricky to make it available in subevents (where Destroy is in your diagram).
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,528

Post » Sun Jan 30, 2011 11:18 pm

I think this is about the first time this has been addressed, at least in this detail, and its awesome. :wink:
While we have your attention Ashley do you think C2 could be designed at least as far as the gui goes to show whats going on?
For example, conditions, and actions get muddied up a bit when we start to think of it as an event, instead of its separate parts.
If we could have a different numbering system, where all conditions, actions..."sub- conditions?", and "sub- actions" were given their own title, like:
(1) condition| (1a) action
-(1s1) sub condition| (1as1) sub action
(2) condition| (2a) action
-(2s1) sub condition| (2as1) sub action
-(2s1) sub condition| (2as1) sub action
--(2s2) sub condition| (2as2) sub action
.......ehh ok that might be a bit much, but perhaps a graduated color scheme for subevents, and at least some kind of marker for the first top level event of each new event.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Mon Jan 31, 2011 6:42 am

[quote="newt":12t8w0yr]I know what its like to be ignored, but its worse to be misunderstood.

[url:12t8w0yr]http://dl.dropbox.com/u/666516/pvsubsubevent.cap[/url:12t8w0yr][/quote:12t8w0yr]
:wink:

What I still don't understand is why an object, that obviously exists, at the same time is not pickable. But I will keep my mouth shut :mrgreen:
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Tue Sep 24, 2013 3:52 am

As a seasoned programmer I find it difficult to accept this kind of setup where, in a loop, you create multiple objects but you can only apply changes or reference the variables of the first one that is created until the next top-level event.

This effectively means that we need to waste CPU cycles re-picking and reiterating over the collection just to get an "atomic" action done such as initializing a collection.. I know it's not really atomic but I think of that as a single conceptual unit of work in game development.Asmodeus2013-09-24 03:54:46
B
9
S
2
Posts: 25
Reputation: 1,050

Post » Wed Sep 25, 2013 9:10 pm

@Asmodeus Can you upload a capx or screenshot or otherwise describe what you want to do? Odds are it can be restructured to avoid this bug.

Also, unless you're performing heavy logic inside your loop of creation, you'll probably find that GPU is where your game will bottleneck, rather than CPU usage.

Construct Classic is based on C++, and the events perform much faster than the (optional) Python implementation (to give you an idea of the speed of cycles).

Edit: Also, a whole sheet of events (or sheets if others are imported), will be run through to constitute one "tick" in the game.Jayjay2013-09-25 21:11:29
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests