lukezero's Forum Posts

  • Thanks,

    Both objects (the spawned and the spawner) aren't Squares.

    Only one sprite is spawned in the object.

    I tried your code here but most of the generated objects are destroyed immediately.

  • Sorry, I was just working on it. http://www.blackhornettechnologies.com/ ... tTest.capx

    This uses two canvas objects, one to draw, one to do the hit-test. I've assigned imagepoints at the corner of the test sprite. When one overlaps a filled area, it is "hit".

    WOW! <img src="{SMILIES_PATH}/icon_eek.gif" alt=":shock:" title="Shocked">

    Great job, blackhornet dude!

    I'm studing your CAPX now to implement it to my needs.

    Thanks for your help! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • Master R0J0hound, I'm using the Canvas plugin (which is definitely the solution for this case), but I still cannot solve this problem.

    I'm trying to draw a line with the canvas whenthe player touch the screen, so the beginning of the line should amend it in order to involve an object. This "circle" must be filled by the canvas, creating a temporary object to be detected for collisions.

    I tried with Path, Move Pen, Draw Path and other with the Touch behavior, but I had no success.

    Sorry to bother you, but I'm just asking for help because I am not familiar with this great plugin.

    In advance thank you for your attention and collaboration.

  • You could look at the Canvas plugin. You can draw your user defined area, flood-fill, then use rbgaAt to detect overlap.

    Thanks for the suggestion,

  • I would create a invisible object to be the area. It doesn't have any behavior or anything, it works just as a collision area. You could try that

    RayKi I need to create a random collision area within the dashed line. A static object isn't useful to accurately detect the internal area.

  • Hi C2 community!

    I'm trying to find a way to detect an object within an random internal area comprised between a central object and a line composed by dashes generated by the touch of the player around this central object.

    I did this illustration below for you guys better understand the situation. If at least one of these objects stay in this random internal area, the player loses.

    I tried to make it through the Line of Sight behavior, calculating the area composed of each stroke object that makes up the broken touch and the central object, but didn't get success. <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    count_dash*distance(Central_Object.X, Central_Object.Y, Dash.X, Dash.Y)

    count_dash is a varible that count every dash spawned by the touch of the player.

    I thank you in advance your attention and collaboration. ^^

    SOLVED BY blackhornet! Link of CAPX example below:

    http://www.blackhornettechnologies.com/ ... tTest.capx

  • Hi C2 developers!

    I tried in many ways to spawn objects only in a sprite collision area, but still didn't get.

    Now I'm using the code below, but the objects still are generated outside the collision polygon.

    System create objects:

    X: random(Sprite.X-Sprite.Width/2,Sprite.X+Sprite.Width/2)

    Y: random(Sprite.Y-Sprite.Height/2,Sprite.Y+Sprite.Height/2)

    Object isn't overlapping Sprite, then Object Destroy

    Does anyone have a better solution to solve this?

    Thanks in advance the attention and collaboration of all. ^^

    SOLVED BY MadSpy! Link of CAPX example below:

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

  • lukezero

    Here's an idea.

    It's a good solution,

    I'm trying to implement it in my game containing a predetermined track, but he does not use this behavior (8direction).

    Thanks one more time for your great help!

  • R0J0hound, do you know how to change the direction of the character's animation walking in a eight directions game, but without having to use the behavior of eight directions?

    I've tried the delimitation of the angle and the X position, but I couldn't.

    In advance thank you for your attention and help always. ^^

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Of course, i'll keep working on this for myself, there is still a LOT to do.

    https://dl.dropboxusercontent.com/u/39210620/Isometroid.capx

    Great job, XpMonster!

    It works very well!

  • Almost.

    As always - I got a "little" carried away.

    No problem, man.

    When you finish, feel free to post it here.

    Thanks again for your cooperation.

  • Actually, i didn't use any behavior too.

    That is good example of point-movement, but that's absolutely useless for isometric games (And that's exactly what i created).

    XpMonster, dude, your CAPX with the movement for isometric games ready yet?

  • lukezero

    The fact it's isometric doesn't make it any different to regular path following.

    Here's a way to do it:

    https://dl.dropboxusercontent.com/u/542 ... ollow.capx

    It just moves toward the next waypoint. At the start and when the targeted waypoint is changed the distance is calculated in a variable. As the sprite move the distance is reduced by the same amount, and when the distance variable becomes negative we know the waypoint was passed so we target the next waypoint.

    Great example, great R0J0hound, mainly because you didn't use any behavior to do so.

    Thanks one more time for your collaboration! <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • As the first image,

    But I note that the grid is invisible on stage. Then I think both are useful for what I want. ^^

  • Alright, it's 40x26.