codah's Forum Posts

  • Okay.

    Well, families group objects together.

    Objects in a family can have different behaviors from each other.

    Referencing a group allows you to use less events to pick out objects (saves you from having to create events for each object).

    When you pick out an object this way and need to perform actions based upon their behavior, then you simply can't do it without extraneous steps that make the events crowded and difficult to change later.

    Doing this defeats the whole point of Families.

    I guess there are logical reasons for their behaviour. A Family is like a base class in OO languages. When using a Family you're saying, I want to treat these types of objects as a 'new' XYZ type. You effectively lose the object type information at that point. To get that information back (in order to access their behaviours) you would need something like an OO 'cast' which retrieves the type information. This is even frowned upon in some OO circles. I disagree it defeats the whole purpose of Families. It cuts down on many identical events as you know. And yes I know C2 is not OO but it's an analogy.

  • Best option: don't start from scratch, start from a template/sample (File menu)

    Next best option: look in the tutorial section and read lots.

    Otherwise try this:

    Run C2.

    Choose menu File/New

    Choose "New empty project" (Enter)

    Double click anywhere

    Double click "Sprite"

    Click the white area inside the dashed lines

    Click inside the square in the window that appears (it should fill with a colour)

    Close the Edit image window

    Click Behaviors link under Properties (left of screen)

    Click "+"

    Double click "Bullet"

    Close Sprite:Behaviors window

    Click on the white area

    Click Project Properties "View" link under Properties

    Next to Preview browser, choose "Node-Webkit"

    Click "Play" (Run) button in tool bar

    You should see a window open and a green square move across the screen.

    Congratulations, your first 'game'.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No it's not possible. TBH it doesn't make sense to me to be able to do that.

  • Another method. Hope it helps.

  • Hi hope this helps.

  • I see, I think posting your capx would probably be the quickest way to solve the issue.

  • [quote:3rui75fx]random(x)

    Generate a random float from 0 to x, not including x.

    Seems to work as documented?

  • thanks for the tips

  • how can add this variable? / Which is the instance variable for the toggle boolean?

    Construct 2 missage: Instance Variable--> <none - add an instance variable first>

    Search "Variables" in the manual. Fully read and understand the first 5 hits. You will have greater challenges than this in making any game.

  • If there are only 3 different monster types. Can't it be as simple as

    System: beast_box.box_id = 0 -> beast_box: Spawn monster1 ...

    System: beast_box.box_id = 1 -> beast_box: Spawn monster2 ...

    System: beast_box.box_id = 2 -> beast_box: Spawn monster3 ...

  • Thank you codah, and sorry for the misunderstanding.

    My original problem was this one : (not allowed to post URLS but check post "Question about using a single event sheet on different level" - last replied wed 27th august 2014 at 6:26 pm)

    What I meant with the number of instances is the following : if I have instances 0, 1 and 2 on layout 1, and I'm currently on layout 2, where there is 3 additional instances of the same object type, will they be numbered 0, 1 and 2 - or - 3, 4 and 5 (IID)

    And so instances awaing for me on layout 3 will be IID 6, 7 and 8?

    While you are on layout 2, there are only 3 instances existing, numbered 0, 1 and 2. When you go back to layout 1, there will still be only 3 instances, 0, 1 and 2. Etc for layout 3. You can check this with Debug mode.

  • Just to jump to the end. If there are only three objects, they won't be IID 4, 5 and 6 they will be 0, 1 and 2.

    Edit: [quote:oxkdu5i0]- Is IID dependent on the # of instances on layout or on the project? No informations on that point in the manual...

    ot sure what you mean by this. IID is for instances, they are in index of the number of instances of an object type. So your instances will always be numbered 0 to Sprite.count - 1

    Edit 2: What I was trying to get from you is "what is the problem you're trying to solve by tagging object instances relative to IID"

  • all this time I need a plugin! ahh! thankyou

    Well it's one way to do it.

  • Hey codah just because I am OP you don't have to tell everyone. LOL

    Now I'm confused!

  • Rable what exactly is your issue? i.e. what is it you can't do?