Velojet's Forum Posts

  • Thanks for bearing with me, folks!

    I take it from what you say is that there's no way in Construct 2 of directly doing what I can do in JavaScript with " 'centreCat.favorite = true' ".

    And now that I've confirmed (I think!) that there's no direct and simple way of doing this that I've missed, I'll work on giving a fuller example, together with what seem to me to be the workarounds that you've suggested.

    I'll be back and hope you can bear with me a bit longer :)

  • Kyatric "Compare the value of an instance variable that you set in the IDE".

    Thanks, I'm aware that you can do it by comparing instance variables, but that seems to me to be a roundabout way of identifying a particular instance in a system condition.

    I was hoping that there's some more direct way of knowing the IID of each instance and being able to use that.

    For example, let's say my layout has a cat in each corner and a cat in the centre. Is there any way I can tell what the IID is of the cat in the centre?

    In JavaScript, they'd each have different names (e.g. centreCat, topLeftCat, ...) and I could say 'centreCat.favorite = true' (with all the cornerCats having their 'favorite' Boolean set to 'false').

    So another way of asking my question is:

    How do I program 'centreCat.favorite = true' in Construct 2?

  • Kyatric Thanks for your rapid response!

    ... but I want to get the system to pick a particular Cat instance (say, the black one), not a random instance. How do I do that? How do I know what IID the black cat has?

  • Yann thanks for the instant reply!

    I can see that that would work when there's user interaction with the cats. But what if there's no user interaction and it's the system that's doing the selection?

    For instance (!), if Cat objects have a Boolean 'favorite' instance variable that's set by the system for one particular cat when a new level is reached, or the game is replayed, or a certain time has passed, how can I add a condition that targets that Cat instance (and that alone) ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If I've placed 5 objects (say, of Object type 'Cat') on a layer, how can I know which Cat has which IID? Or to put it another way, if I pick Cat instance 1, how do I know which Cat I'm picking?

    The IID for a particular Cat instance is not shown in the Properties Bar (because the IID is allocated at runtime?), so how can I pick it with certainty when I add a condition that will target an action on that Cat instance alone?

  • Many thanks, Tom. Frustration vanished!

  • To quote the Rules:

    "2.Every game must make use of the system 'Rotate layer' or 'Rotate layout' actions".

    I take it that 'Rotate layer' and 'Rotate layout' refer to 'Set layer angle' and 'Set layout angle' ?

  • It occurred to me that this might be browser dependent, but no - IE9, Firefox 9, Chrome 16, Safari 5 - same all round.

  • Thanks for following this up, Tom. Here's what I do:

    • I make my changes in the editor. Just above the 'Submit' button, it lists (just a plain list, not in an editable text area):

        Tags

        ?animation

        ?Help

        ?Platform

        ?Solid

        ?Tutorial

    • I click 'Submit'.
    • I'm taken back to the 'Edit tutorial' page, now with a pink banner beneath the first par ('If you wish to make an edit, ...') with these words in bold red: 'Please enter up to five tags' - but there's nowhere to enter them, and now just above the 'Submit' button is simply the heading 'Tags' and the list has vanished.
  • I just posted a PM to Ashley about this issue. Here's how it bit me:

    I went to edit my latest tutorial ('Building a platform game') and when I clicked 'Submit', I was given the warning message 'Please enter up to 5 tags' (even though my original version had 5 tags) - and the usual place to (re-)enter them was missing.

  • Well, Friday 13 didn't seem like a very auspicious date to publish my tutorial, so I upped its priority on my 'To Do' list, with the result that I've just now published 'Building a platform game - a beginner's guide'. Feedback is welcome!

  • Cpryd001 Thanks for your offer! My tutorial opens with "This is the first part of a work in progress. Please post your comments about what should go in further instalments (and tell me what needs correcting)." - so I'd warmly welcome your input.

  • Kyatric "Ashley said also he was working on some tutorial, like the beginner's guide but aimed at platformers. Check out for when it is out."

    Just to tell Constructors that, knowing how much work Ashley has on his plate, I've started work on a tutorial 'Building a platform game - a beginner's guide'. I hope to publish the first instalment around the end of next week (Friday 13th !).

  • Well, C2 really is object oriented, surely, in the accepted sense that its objects have both behaviour and state.

    Weishaupt, I think you're meaning something else when you ask for variables to hold objects. When Ashley points out that you can hold an object in a variable by storing its UID, does that not give you what you want?

  • Great news: The plugins references are now complete !

    Excellent ! Very clear explanations, and very helpful.