mahdi71's Forum Posts

  • When player wanna to join the game

    ask host now player count frist

    what ?!

    i dont understand that !

    i just disconnect all peers then create a new room with a different instance and all peers connect to that so new players can not see the new room! but this create so much problem like : when a peer can not join host or if peer join sooner the real host and... !!

    what i must do ?!

  • hi ,

    how do i lock the room after i want to start game ? my game dont have enough peer to lock when full but players wants to start and in my game after game start no one must can join into room...

    and,

    how do i get the same instance object in the other peer ?

    if we have something like NUID this can be very useful like UID but same in all peers

  • mahdi71 ,

    1) You create a Sprite object

    2) After you click on the layout editor, the Image editor will open up

    3) Right click on the Animation frames window and choose: Import frames/From sprite strip

    4) C2 is clever enough to detect that your png has a single row of 48 images (Number of horizontal cells = 48, Number of vertical cells = 1). Press ok.

    5) Setup the speed for your explosion (the default fps is 5 which is too slow in your case) 24 or so works nice.

    You are done.

    You can always overlay bright images with black backgrounds using either the Additive blend mode (in the effects properties of the Sprite object), or add one of the additive blend webGL effects (like Screen, Dodge, Lighten, Soft light...).

    There is also the Chroma 2 webGl effect (search the forum) which works like keylight (in After Effects) or similar software that do color removal for Green/Blue Screens.

    Thank you very much....

  • hi,

    how do i use one png like this for an animation ?

    [attachment=0:66nei0n8][/attachment:66nei0n8]

    if i can not do that : the gif file is with a black background .. how do change that into transparent?

  • If you wish, you can purchase the signalling server in the scirra store , host it yourself or adapt it to your needs.

    thanks.. i didn't see that .. sorry.. it's good...

  • hi,

    we all must use scirra signalling server but maybe someone wants to use himself signalling server.. or if scirra server is down or someday signalling server is closed then our games is closed ..

    signalling server is good.. and thanks for that to scirra ..

    but i think you must publish the script and configs for saving users time and make them sure they games never closed

    i am a php developer and i can make it but its get so much time because i must see the source of multiplayer plugin.. and this get so much time..

    so its good to publish that..

  • If my variable1 is 1 then the following conditions, actions and sub-events won't run.

    ok .. thats good

    thank you

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • hi,

    my event is :

    Event :

    variable1 = 0

    pick nearest to x,y

    ...

    ...

    _____

    so if my variable1 is 1 then pick nearest to x,y is performing or not ?!

    they all in the same event (not sub event).. but in that order ..

  • hi,

    i want to make a background (map) for my game

    my game must have big maps like 2048x2048 and bigger

    so what is the best way (best performance) ? :

    1 - i draw all things like rocks and... in one background and use that picture as a background (size of picture is same size of the map)

    2 - or i use smaller background (like 256x256 and repeat it) and create so much (like 100 objects or more) objects and sprites on that background (like different sprite for rocks and walls and ....)

    Thanks

  • This is not a bug. There are a number of way to deal with this. Off the top of my head, you could set an invisible target pinned to the corners of your big objects.

    this is a bug..

    that is not the right way...

    if i have 50 objects so i must pin 5-10 to each one ! .. so we lost performance and time... !

    yes we can fix this but if we must "deal with this" so it is a bug !

    we can make this behavior with construct 2 but with using the behavior we spend smaller time

    construct 2 have the basics (we can do programming with construct 2) so we can tell we don't need the behaviors because we can make all of that behaviors with construct 2 ... but no .. this is about time and performance...

  • Problem Description

    hi,

    turret behavior range just compare the middle of an object and if middle (or x and y) is in the range then fire..

    but in large objects this is a problem ... because maybe some of an object is in the range but still middle is not in range and in real life if some of the object is in range then turret can fire..

    thanks

    Attach a Capx

    [attachment=0:2x08d82w][/attachment:2x08d82w]

    Description of Capx

    in my capx file you can see this problem .. the object is in range but the turrets not firing..

    but if you move the object more near to the turrets .. when middle is in range then turret firing..

    this is a big problem when we have large and small targets

    Steps to Reproduce Bug

    • make a sprite with a big size
    • make that sprite to target of a turret
    • you can see the bug

    Observed Result

    the turret range just use x and y position for checking the target is in range or not

    Expected Result

    turret must check all of an object for checking the target is in range or not

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    windows 8.1 pro 64bit

    Construct 2 Version ID

    r173

  • hi,

    since the old pathfinding behavior is slow and have problem with overlaps and more objects ...i recommend the Flow Field Pathfinding

    this pathfinding is the new method

    see the video for more info .. its really good...

    youtube.com/watch?v=bovlsENv1g4

    ...

    and for more information see this link and you can find more info by searching google...

    grail.cs.washington.edu/projects/crowd-flows/

  • Set Point X Sprite.X+cos(Sprite.Angle+Point.myAngle)*Point.myDistance

    Set Point Y Sprite.Y+sin(Sprite.Angle+Point.myAngle)*Point.myDistance

    Or if I understood this correctly

    [quote:2f8o8abu](always get the top point of an object (object angle doesn't matter) )

    like variable myangle = 90 then i get the position of point from right side of object

    Set Point X Sprite.X+cos(270+Point.myAngle)*Point.myDistance

    Set Point Y Sprite.Y+sin(270+Point.myAngle)*Point.myDistance

    Note that angle 0 is to the right.

    yes... its good and working ...

    thank you very much ...

  • hi,

    how do i get the point position on this picture ?

    [attachment=1:2lmcurt4][/attachment:2lmcurt4]

    [attachment=0:2lmcurt4][/attachment:2lmcurt4]

    what is the formula ?

    as you can see i want the left side point (x and y) position from the object..

    i want to create that point ..

    the distance of that point from the object is a variable like "mydistance"

    and i want to set another variable like "myangle" and get the other point from object too .. like top point of object (always get the top point of an object (object angle doesn't matter) )

    like variable myangle = 90 then i get the position of point from right side of object

    thanks

  • hi

    some group:

    mouse left botton is down :

    • object1 set position to mouse x,y

    ..

    so many groups and events and actions

    ..

    another group:

    foreach object2:

    • set position to object 1
    • set angle to object 2

    __________

    but object2 is late ... when i move the mouse a little faster ... or when object1 rotate a little fast

    but when i set position and angle of object2 just after the object1 in the same event (mouse left button is down) then it is ok and have no late !

    if i set that in the same event i will be confused later ... so is there another way ? (in unity we have lateupdate function for that ... so that function make sure in the last of every frame things happen)