seawall's Forum Posts

  • 12 posts
  • I presume you dont have acces to famelies.

    Allow me to offer you 2 warnings.

    1/ I am not an expert.

    2/ I am pretty sure that there is no easy solution.

    Two more general things.

    On Collision is a trigger. In your Cap none of the 'sprites' is moving. So its kinda useless to use On Collision. The trigger keeps firing.

    Because the trigger keeps firing, your Cap is in a state of an endless loop. You should be more carefull with that.

    Now. Your problem. Why is it not that easy?

    Well, when using 'on collision' condition on all those 'sprites' a big list of sprites is returned as a result in the Selected Object List (official term, wich i call 'the picklist'). 15 in your case.

    On top, you want to compare them in pairs.

    Is one's flag 0 and the other one's flag 1, then do this(), if they overlap.

    This Cap is one way to do it. The ListObject gives inside on whats happening. Lists are awsome debugging helpers.

    https://

    drive.google.com/open?id=0B1SSuCVV8v74RTkzNWVRS0llVXM

    You will see 'pick all' conditions.

    Why?

    The conditions before those 'pick all' conditions narrowed down The Picklist.

    The 'sprite' that needed to be tested was not any more in The Picklist.

    Therfore, enlarge The Picklist was needed.

    this metod only works on start, if i try change every coolision or every x second to update collision there will be big perfomance problem like 1 fps on 6 core 3gz CPU.

  • Ok! Thanks Vallar for clarifying that.

    seawall This does what has been described:

    EDIT: Added comments

    this metod almost works, only problem its not work on start or block not moving, changing to overlaping not help.

    i need make it work when blocks not moving.

  • I don't think it is too hard, no. But I couldn't understand what you need and the CAPX wasn't really enough. After all I am only trying to help.

    Here is a method to do this:

    https://goo.gl/c0u2gy

    I cloned the same object and only changed the flag and its name. So they are 2 objects now (Flag0 and Flag1) but both look the same. Now you can just do a collision check and from that check you can do whatever action you want.

    If you don't like this method, I suggest you wait for someone else's answer. Good luck!

    thanks, i need use 1 object i plan add many data to it, and this example shows how limited contruct 2 is.

  • A pick with evaluation action should do the trick.

    Try the Capx I have linked below:

    https://goo.gl/LPOZNq

    EDIT: Fixed URL

    Nooo, this not work, it give action to center sprite, i dont need give action to it i need check collision to it and give action to all others that directly collide to it. It makes center sprite opacy 50%, i need conneted sprites to it become 50% and dont touch others that not have direct collision to flag =1.

    I need do that (i set opacy manualy to show):

    its that to hard to do?

  • I think your actions need to change. Remove the "For Each" and have it like that:

    > On Collision with Sprite:

    ----> Compare flag = 0 ::::> Set opacity to 50

    if i do that it set opacy 50 to all sprites that have collision and have flag=0, and i need only set opacy if it collide to sprite with flag =1

  • I am trying to understand exactly what you are trying to do and I am not sure I fully understand it.

    So here is a little CAPX that might help with collision detection based on an instance variable.

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

    There is a space added because the forums removes the URL

    If that doesn't help, let me know. Good luck! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

    link briken dropbox.com/s/z0f9kv2rdezjh ... .capx?dl=0 its insert ... can you pust link in short way or two parts?

    i just need give action to object if its collide with object that has value 1, program allow give action only to first object, because its same object i need check values on object that coolide with object that i need add action.. program dont allow do that it not have multi rules or rules insade rules, if you do condition it will filter all others object from it, and it allows do condition values check only to firs object not second that need to check.... ((((

  • can someone help me please ? there is example .capx ge.tt/4rgpnvY2 , need make sprite objects that collide center sprite opacy 50 and do nothing that not collide with flag=1 directly, nothing helps <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad" />

  • In that case do two conditions:

    -----> Compare Variable Flag = 0

    AND (right click on the slot above and select "Add Another Condition").

    ------> Compare Variable Flag = 1

    Now you can compare the flags as you wish.

    if i do 2 comparsion-condition merged it give negative result, there will be no object because it cant be flag=0 and flag=1 in same time... and if i do and, or, or separate subconditions i also cant select because object will filter by first condition.

    I can do - if object with flag=1 collide to object, and cant do - if object collide to object with flag=1,

    , seems its just imposible, how it can be that hard?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't at the moment test my theory, but if I recall correctly, you can use one of the below solutions:

    > On Collision with Object X

    ----> For Each

    -------- > Compare Variable Flag = 0

    Do actions.

    That or instead of using "For Each" you can use Pick All Comparison and add in an expression: object.flag and equal to 0 or 1.

    Hope that helps.

    that problem, compare flag = 0 not enought, need also comparsion to collided object that must have flag 1, if i do like you say its select all objects with flag = 0 if only one collide to flag 1, i need select only object with flag = 0 that directly collide with flag=1

  • i need give action to object that collide with other same instanse object with different value.

    i try all, nothing works, when i use conditions,or,and or sub condition, i can give actions only to objects in conditions... i can give actions only to all objects that overlapping-collide, no multi rules or rules inside rules?

    for example : i have 40 sprites clones of same object, some of them have value flag 1 other 0, i need give action only to object that overlapping-collisions with flag 1 and have flag 0, and left others that do not collide with it.

    how to do that?

  • Its posible create tetris like game without use arrays or other tools that need high iq?

  • How to change animation after specific time, i tryed use stop animation at object creation and start after x second but have problem objects move-jump like it was recreated (physics enabled), what problem?

  • 12 posts