worm1's Forum Posts

  • Thx kriand , it s seems to be a good solution but i can't pick instance with UID , i must pick instance with value in X of array . It s my problem

  • Hi,

    I manage instance variables of sprites with an array XY.

    The X is and ID of sprite and Y a number.

    I want to check along the array if the number of sprite in Y is equal to a number and destroy all sprites found.

    For example my array is :

    0 - 0,4
    1 - 1,4
    2 - 2,3
    3 - 3,3
    4 - 4,1
    5 - 5,1
    [/code:1e7rhwkn]
    
    If my number to search is 3 , i want destroy sprites with Y number 3 so i ll destroy sprites in 2,3 in the X of my array.
    
    Ty for helps.
  • Ok thx dop2000, i ll change the management of instances by array. It seems to be easy for manipulate elements.

  • Hi,

    i use a dictionnary to manage instance of sprites and i want to apply the equivalent of this fonction :

    https://help.adobe.com/en_US/as2/reference/flashlite/WS5b3ccc516d4fbf351e63e3d118cd9b5f6e-797f.html

    I do not see an identical method in construct 2

    Ty for help

  • I am trying to rewrite an old engine in as2 flash , but I caught the trick in the meantime to speed up the sprite movement , a coefficient must be applied to variable n

    Ty for help

  • Hi,

    I move a sprite using an array of coordinates

    [766,72,765.8,72,765.6,72,765.4,72,765.2,72,765,72,764.8,72,764.6,72,764.4,72,764.2,72,764,72,763.8,72,763.6,72,763.4,72,763.2,72,763,72,762.8,72,762.6][/code:1vknpr0g]I try to use 
    
    [code:1vknpr0g]
    
    System every tick -> sprite Set to X int(Array.At(n))
                                       sprite Set to Y int(Array.At(n+1))
                                      system Set n to +2
    [/code:1vknpr0g]
    
    It s to slow to browse the array so i need other method but i don t know how do that 
    
    Thx for helps
  • Sorry i found the problem, my copied objects were not on the same layer

  • Hi ,

    I try to apply an action for all instances of a same object , i have copy and paste objects on the layer from the original...

    I use

    System - For each Object - Do action
    [/code:3k9yg3c6]
    
    The problem is that only the original object do the action not the others ;( 
    
    Any suggestions ?
    
    Ty for help
  • Televangelist yes you can use this plug-in to make a zelda

  • Hi ,

    Finally I was able to solve the problem using your method dop2000 thank you

    I detect the number of vectors during the overlapping of the ball and if the number of vectors is> 1 then I add just 180 degrees to the angle of the ball

    Ty again for help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Not exactly dop2000

    It' s when the ball touches the side of the vector as in the example that the angle should be 135 and not 35. I think it may be necessary to do another collision management to use the vectors as they are...

  • Thx dop2000 for all these solutions, finally I will need to choose a vector in particular because the problem is not the overlap of two vectors but the fact that when the ball touches a side of the vector the collision angle is totally false. I do not know how I'm going to manage this ...

  • Thx for replies.

    I would like to choose either one does not matter.

    dop2000 i don't understand your sub-event . I specify my vectors are just sprites in the form of rectangular bars that I associate to make polygons

  • I developed my own engine to handle the bounce of a ball on walls using vectors but I have a problem with the collision detection function of construct2 is overlapping.

    When my ball touches two vectors at the same time (the corners of a rectangle of vectors for example) my engine receives two vectors and it sucks *****

    Is there a way to tell the is overlapping function to choose only one of the vectors?

    Ty !

  • Thx for the plugin !

    Can we use it to manage collisions of a moving object to calculate bounce off ? thx