Missing object expressions / inconsistencies

0 favourites
  • 9 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • 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!

  • 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?

  • 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!

  • 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

  • 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)

  • +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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • > 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

  • Ashley

    That's true. The case usage I was thinking of was more along the lines of, being able to get a quick reference to a member variable of an object instance without having to alter/change the current SOL. (though I guess the SOL will remain intact if you put it in a subevent block)

    With UID indexer it's just nice because you don't have to write a separate "Pick All, Pick by Unique UID, Save Object.MemberVariable to Temporary Local Variable." Event. You can't really use the IID indexer for this type of situation either since IID is not guaranteed to be a consistent reference.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)