tarek2's Recent Forum Activity

  • what i need to be able to do, for example, is loop over each sprite instance of an object type in a family, and add up the current animation frame number.

    In pesudo code this looks like this:

    set global variable v = 0

    for each instance inst of object type in family boxes

    add to v inst.animationFrame

    This code should run everything any of the boxes is touched / tougled

    this would yield a number that indicates if all animation frames are zero -- i.e. white, or at least one red, i.e. the sum is greater than zero.

    But, i don't see a way to do this with family

    the only way i see right now is to hard code the sum using the actual sprite names

    Hoo I see, You don't need a loop for that, you need just a simple comparison of the Frame it will loop automatically through all the instances matching the condition if none is found the Else, in this case, means all the family Frames are = 0

    see event 5 where I call the Function

  • Thanks.

    Sorry for the confusion.

    No problem mate

    is it something like this?

    https://www.dropbox.com/s/xevtnf2s9p9b4ah/ColorChange.capx?dl=0

    For the explanation you gave it looks like you have 4 separate objects so I follow your design but I don't think you need separate objects or families in this situation, let me know if something is wrong

  • So your problem is with the (fourth box) that it should change the color when one or more boxes from the family change color?

    or

    When One of the Family boxes changes color none of the other two boxes on the family should be colored?

    it's a bit confusing what exactly you trying to archive

  • > I have many Links saved That I collect throughout the years organized in folders by Topics to easy Find Them, are all the old links gonna be lost?

    They'll all work now

    Haa Thanks a lot for the quick Fix that's awesome :)

    I will wait until you come back from your holidays to ask about my other questions again, you know about the profile links not showing up etc.. but those are not urgent

  • you can do it in many ways, the first idea that comes to my mind quick and easy using triggers?

    here's an example

    https://www.dropbox.com/s/85dfhev2iig6014/Z-Order.capx?dl=0

    Note: has no solids yet but you will get the idea

  • Can someone link me to a post with broken links? Having a quick scan through some posts and they seem to be working.

    Hi Tom,

    I have many Links saved That I collect throughout the years organized in folders by Topics to easy Find Them, are all the old links gonna be lost?

    As a random example here are a few

    https://www.scirra.com/forum/viewtopic.php?f=146&t=189093&p=1108924&hilit=how+picking+works#p1108924

    https://www.scirra.com/forum/viewtopic.php?f=147&t=190451

    https://www.scirra.com/forum/viewtopic.php?f=178&t=189058&p=1108913#p1108913

    https://www.scirra.com/forum/viewtopic.php?f=147&t=194900&p=1136297#p1136297

    https://www.scirra.com/forum/viewtopic.php?f=147&t=169959&p=1022372#p1022372

    Most of my saved Links which are a lot they show me the 404 Error I hope you can fix all the old Links as has been huge work collecting and organizing by Topics

    ===========================================

    And another thing can you restore the old search from profiles where we had all the post that we post since the first day that we register on Scirra, that was very useful as you can trace all the post in chronological order from the newest to the oldest Plus they had the Tittle of the Topic of the thread before you enter on the post to easily identify in which thread you posted

    Example if you go to my Scirra profile it doesn't show anymore the section of all the post that I posted

    https://www.scirra.com/users/tarek2

    And would have been awesome if you had given the change to select the theme for the forum (New or Old) as I'm finding the new one very bright is hurting my eyes, with the old theme was perfect I could spend hours and hours reading without any problems

    Thank you

  • [quote:1ho0bt26]Aah .. finally it's solved.

    Thanks for giving your time to help and explaining the concept

    No problem m8

  • [quote:2uvyqft1]In the file, I provided previously when I am setting the layout where both the targets are overlapping each other then the drop function does not work. When both are placed separate then the drop works perfectly.

    Ok I think I get what you mean now

    So you are saying when both Targets are together and you Drag&drop an object on the targets it doesn't work right?

    That's because they are two states that are true at the same Time and therefore both of them they will fire at the same time as the object overlaps two Targets at the same time

    Object overlaps >>> Target >>> yes is true and picks Both Targets

    > object.id = Target.id >>>> is True >>>set position

    Else>>>>>>>>>>>>>>>>>> is True >>>Back to the starting Position

    The problem is here (object.id = Target.id) is not the same as (Target.id = object.id) even if they are technically the same just inverted but the results will be different, one just compares and the other one Picks

    Capx:

    https://www.dropbox.com/s/3oe5og12khuk14l/DragMatchObjects2.capx?dl=0

  • jmg89

    Here is a capx using Family

    https://www.dropbox.com/s/fsok38w5qh0uqgu/DragMatchObjects.capx?dl=0

    you cant open it with the free version

  • [quote:1zeh2cur]

    Thanks for the comment.

    Can you please provide a capx file?

    I've even tried family, but there too experiencing same problem

    Sure, just to make sure I followed what you trying to do as is not very clear

    1-When Sprite overlaps Target and is the same Id >>> Sprite set position to the Target

    2-When Target Overlaps Target has to be the same Id or doesn't matter??

    if you can explain the steps you trying to accomplish will be easier and quicker

  • [quote:2bd3vftc]When the targets are not overlapping each other it works correctly. But, when 1 target is overlapping on another target in the layout then the drop function does not work in the overlapping region.

    How to solve this issue?

    You have the Events Referencing (Sprite Vs Target) only, what you need is to create Events referencing (Target Vs Target) swell

    Will be easier if you put all the objects in a Family so you create just one Event like you did

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:3sbgnu9v]4 different tiles are fine, BUT you cannot animate them. So if you don´t intend to animate them, use the tilemap.

    I see what you mean, they are just static animation

    [quote:3sbgnu9v][quote:3sbgnu9v]I thought that I read in other threads that if the Tiles are the same it counts the draw call as 1

    Is should be sort of true if you use the same tile. So if you use the same tile 100 times it should be 1 drawcall (I´m not sure if it´s actually only a single drawcall but it should be faster) if you have 100 different tiles, each will have a drawcall.

    /quote]

    Cool, that's what I was looking for, as in all the threads talking about this topic they mention if the Tiles are the same it counts the draw call as 1 but they end up with as long you don't use many different (Tiles Animations) which instead will be better to use sprites, since my confusion of how much will be categorize to

    much (different Tiles Animations) as it sounded you cant mix up many different Tiles that's why I asked if 4 Tilemaps will be more efficient.

    But if you can mix tiles as you said then is much easier to know who will be a better choice

    TileMap of 400 Tiles: using 4 different animations, say 100 tiles for each animation that will be = 4 Drawcalls

    400 Sprites: using 4 different animations, say 100 tiles for each animation that will be = 400 Drawcalls

    if this correct is much easier to see who is the winner unless I missed something

    WackyToaster thanks very much for helping me clear up the confusion

tarek2's avatar

tarek2

Early Adopter

Member since 26 Jan, 2016

Twitter
tarek2 has 12 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • x5
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

15/44
How to earn trophies