codah's Forum Posts

  • No I meant after picking all the TopSolderis/BottomSoldiers, run them through the function with a for each, in a subevent that just does the function call. Easier if you could post the capx if possible.

  • In events 2 and 3 try using a For Each when calling your function.

  • Make sure you export your C2 project into the www folder ('\myproject\www') created by XDK, not '\myproject'.

  • advertising in crosswalk is not possible

    Not possible? You mean, not possible without a big headache right?

  • Doesn't look hard. With your rep you must have made some past projects to give you experience? Does this tutorial help? https://www.scirra.com/tutorials/1137/fruit-machine You will need to add some nice effects, etc.

  • > It really is a friendly advise; if you link some of your work of any kind (graphics, games, music, animation...etc.) people could see and get a rough idea before jumping in.

    >

    I am not gonna link any work, because i havent done anything yet.

    I was looking team mate , with whom i can start working on something , anything

    Do you have a concept/idea at all?

  • Ok can we ban 30 year olds who call themselves 'old' please

  • something like

    IF random(100) < 80 do X

    ELSE do Y

  • >

    > > codah

    > >

    > > No, 'nickname' plugin could not solve this problem.

    > >

    >

    > You're right, I had a go but it doesn't solve anything. I wonder about families within families (multiple 'inheritance' )

    >

    That has been discussed many times, it is just not what families are meant for

    vee41 Are you referring to the OP or my 'families within families' comment?

    If the latter, you're right there has been a lot of discussion (I've just had a read over some older posts). There is obviously a desire for this kind of thing, and I don't think it's totally without merit. Ashley quite categorically said that this won't be implemented, as you can have objects in multiple families. While this helps with some things, it doesn't cover all needs.

    [quote:1yip5d31]Families already implement inheritance. If you want multiple inheritance, you can add one object to multiple families. That should be equivalent to having families in families, so there's no need to implement that.

    Anyway long story short.. I found a couple of people suggesting a reasonable workaround, like this:

    [quote:1yip5d31]There's a nice little trick

    + Foreach Family1:
       + SmallShip pick by UID Family.UID
          -> Fire Small bullet
       + LargeShip pick by UID Family.UID
          -> Fire Large bullet[/code:1yip5d31]
    
    What I like to call C2's object type casting
  • codah

    No, 'nickname' plugin could not solve this problem.

    You're right, I had a go but it doesn't solve anything. I wonder about families within families (multiple 'inheritance' )

  • >

    >

    > I can see issues with this. How would you know if you were inadvertently accessing a behaviour that didn't exist?

    >

    Like I said, it would simply ignore it. Nothing would happen if it doesn't exist. You should know how your program works, so running into this issue wouldn't be an issue if you're aware of what things should be doing.

    .

    That's why I said inadvertently. That would be a very frustrating class of bug.

  • There's a simple work-around that I use sometimes. If you want to identify a sprite from a picked family then add a variable to the family to allow you to identify the sprite that has the behaviour you want to change. Then, using the Family.UID, the instance of that particular sprite can be picked (or instance of other family, if applicable). See the attached file for a super-simple demo. Hope this helps...

    I guess this is exactly what the OP is trying to avoid

    One thing that might help is by allowing a Family to belong in another Family, and aggregate the behaviours across all contained Families. This is something I've wanted a few times.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What I would want, or what I think would suffice:

    Families collect all behaviors from each object in the family, and provides access to these behaviors in the event sheets, but if the behavior is used, and the instance doesn't have that behavior, then that it is ignored.

    Seems like a simple thing to implement?

    I can see issues with this. How would you know if you were inadvertently accessing a behaviour that didn't exist? Could take a bit of debugging. I can just see it getting out of hand, and also breaking the tenet of 'simplicity' for C2.

    I'm curious what kind of workaround you're using at the moment. I would think something with the 'nickname' plugin would work.