Missing object expressions / inconsistencies

Discussion and feedback on Construct 2

Post » Mon Jan 05, 2015 6:38 pm

@Ashley There are a few object expressions you can retrieve when using "Compare two values", but not through the object itself. Why is that? It can make object picking difficult at times.

For example, you cannot retrieve a bullet object's angle of motion through the object...instead you must use "Compare two values" which tests all instances, correct?

On a similar note, can you please add conditions to check if a behavior is enabled? Sinewave behavior has this, but it seems the rest of them don't.
Also the platform behavior can check if it's against a wall, or on the floor, but not on the ceiling. Can you please add that too? Consistency, man!
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Mon Jan 05, 2015 6:48 pm

I guess sometimes they're oversights. Could you make a list of all the missing ones you want added and then I can go through them and add them?
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Mon Jan 05, 2015 7:13 pm

Oh ok. Just wasn't sure if there was a reason for for it or what.

Anyway I'd be happy to put together a list and post it here asap.

Thanks!
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Mon Jan 05, 2015 8:47 pm

Is it possible to obtain expression for specific UID or currently picked instance just like IID does(Sprite(0).X)? I would like to use them.
Last edited by StormHo on Tue Jan 06, 2015 8:15 am, edited 1 time in total.
B
17
S
4
G
1
Posts: 203
Reputation: 1,583

Post » Mon Jan 05, 2015 10:03 pm

StormHo wrote:Is it possible to obtain expression for specific UID or picked instance just like IID does(Sprite(0).X)? I would like to use them.


Yeah, that would be neat
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Mon Jan 05, 2015 10:18 pm

Tokinsom wrote:@Ashley There are a few object expressions you can retrieve when using "Compare two values", but not through the object itself.


Sometimes you have neither, like scale (e.g. Sprite, SpriteFont)
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Jan 06, 2015 6:21 am

+1 for an expression based UID indexer. There was a thread a couple years back about this, perhaps using object[UID] as opposed to object(IID).

https://www.scirra.com/forum/viewtopic.php?f=146&t=66712

@Ashley Are there any plans to add this? In some cases it would allow us to skip having to make extra picking events altogether.
B
31
S
7
G
8
Posts: 232
Reputation: 6,254

Post » Tue Jan 06, 2015 8:16 am

cacotigon wrote:+1 for an expression based UID indexer. There was a thread a couple years back about this, perhaps using object[UID] as opposed to object(IID).

https://www.scirra.com/forum/viewtopic.php?f=146&t=66712

@Ashley Are there any plans to add this? In some cases it would allow us to skip having to make extra picking events altogether.


Didnt know that this was in the todo list of scirra long time ago
B
17
S
4
G
1
Posts: 203
Reputation: 1,583

Post » Tue Jan 06, 2015 12:32 pm

StormHo wrote:Is it possible to obtain expression for specific UID or currently picked instance just like IID does(Sprite(0).X)? I would like to use them.

IIRC, back in the early days, Sprite(N).X would actually look up the Sprite with the UID N and return its X position, but it got changed to index because it was more useful. I can't recollect the exact rationale now, it was too long ago, but just thinking about it now it does seem more straightforward since Sprite(0) always returns the first picked instance, Sprite(1) the second picked, etc. without needing to know any UIDs.

If you want to get expressions from an object with a specific UID you can already use 'Pick by UID', and put 'Pick all' before it if you want to also be able to pick objects which don't match the parent events.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,772

Post » Tue Jan 06, 2015 1:42 pm

Ashley wrote:
StormHo wrote:Is it possible to obtain expression for specific UID or currently picked instance just like IID does(Sprite(0).X)? I would like to use them.

IIRC, back in the early days, Sprite(N).X would actually look up the Sprite with the UID N and return its X position, but it got changed to index because it was more useful. I can't recollect the exact rationale now, it was too long ago, but just thinking about it now it does seem more straightforward since Sprite(0) always returns the first picked instance, Sprite(1) the second picked, etc. without needing to know any UIDs.

If you want to get expressions from an object with a specific UID you can already use 'Pick by UID', and put 'Pick all' before it if you want to also be able to pick objects which don't match the parent events.


But the Sprite(0).X actually pick the IID 0 instead of the first picked instance
You do not have the required permissions to view the files attached to this post.
B
17
S
4
G
1
Posts: 203
Reputation: 1,583

Next

Return to Construct 2 General

Who is online

Users browsing this forum: BackendFreak, rayolaser, Yahoo [Bot] and 24 guests