mumu64's Forum Posts

  • Codah, thanks.

    I did not write my full requirement, because I thought: instead of telling me how to solve the whole problem (at which point I may seem lazy to find it out on myself), I only asked about one specific thing I thought I would need to solve it.

    My full requirement is:

    There are 30 heads. 30 tails.

    Create one random head. Create one random tail.

    Now check if they belong to eachother.

    I found the solution and it I had to use family instances, just as you said.

    I created only 1 big family (instead of a heads and tails family)

    The big family received 2 instances from me: "head" and "name".

    I did:

    on start of layout:

    global var: CreateAHead=1

    • >create instance from big family
    • > if head = 0: destroy
    • > if head = 1: remember the "name" in another glob var and turn on yet another glob var: "CreateATail" (and set glob var "CreateAHead" to 0)

    With the create a tail-part I did the same as above.

    Final step: if name of head = name of body: it is a match.

    If you think this is very cumbersome, let me know, because I always want to improve my events.

    (just edited this, corrected my English and added a line in the "-> if head = 1: remember the "name"...-sentence.

  • Thanks a lot! I just checked it out. It is not what I exactly meant, but at least now I have seen an example of spritefont.

    In your 2nd example:

    Let's say head1 and tail1 are a couple.

    How would you check whether the head and the tail-sprite on screen match?

    So: head1 and tail2 on screen: no match.

    head1, tail1 on screen: match ("do something").

    I am going to try something again with instance variables again. If I have something, I will post it.

  • Almost correct, they are in 2 different groups. Kind of like a head and tail. Or front and back.

    So not "any" 2 sprites, but

    • 2 sprites are randomly created, check if the "head" (following my example) belongs to the "tail".

    So the rest of expression is correct.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply and sorry, but I cannot find a way to either:

    • retrieve the instance variable (as some kind of alias/identifier) of the member of the family, or
    • use UID or IID (as some kind of alias/identifier), because this is not a fixed number

    Perhaps I should not use families the way I want it to use?

    My goal is to check if 2 sprites on screen is true, without writing seperate and similar events for all sprites (if sprite 1 is on screen AND sprite2 is on screen: do something).

  • Let's say I have 100 sprites in family "Sprites", I named them Sprite1, Sprite2, Sprite3, and so on.

    On start of layout: create object "Sprites" on layer 0 at (100, 100)

    Result: A random sprite has been created.

    My question is: how can I check which sprite has been created?

    Because later on I want to match: if, for example, sprite21 has been created, then do something.

  • hello, I was wondering if you could give me your experience when you have used Dictionary instead of an Array and vice versa.

    I have read the manual of both objects and right now I think:

    • a dictionary is like a 2d array, but with less options to manipulate the data
    • both objects can store numbers as well as strings.
    • I could store an inventory in both a Dictionary and 2d Array (if I'm right) and change the values (at any time).

    I am looking forward to your experience when one object was more useful than the other or some advice when not to use Dictionary or Array.

  • Great! Cute graphics.

    And thanks for the behind the scenes look Always interesting to me.

  • hi,

    I tried:

    Every 0,1 seconds:

    Create object on (circle.X + cos(random(360) * circle.width/2), circle.Y + sin(random(360) * circle.width/2)];

    My wish is that the objects are all created at a random place, within the circle, not overlapping the outside of this circle.

    This did not work for me.

    Do you have another suggestion?

    I think I am looking for a way to spawn objects at an x distance pixels from the middle of a circle.

    If I worked with a square, this would have been no problem.

    Circles provide more complexity.

  • Thanks!

  • How do I position an image point from one sprite to an image point of another sprite?

  • Nice art Very welcoming to play ^_^

  • Thanks

  • Me too.

    https://forums.html5dev-software.intel. ... ova#p28880

    One post at this forum:

    Re: Apache Cordova - Security Vulnerabilities

    Postby IntelPaulF » Sun Oct 12, 2014 7:38 pm

    Please see the prior post regarding Crosswalk and 3.5.1 -- when it has been updated so it is using 3.5.1 a notice will be posted. We have only heard of people being notified of the need to update their apps. We have not heard of anyone actually having an app pulled, at this time.

    Paul Fischer

    Technical Consulting Engineer

    Intel Corporation, HTML5 Dev Tools

  • Thanks.

  • Thanks!