matriax's Recent Forum Activity

  • I have a menu with X icons.

    When with the mouse i click on a icon this one is selected, ok. I use a instance variable called "active" 0/1. And when is active i set the animation to On. when is 0 animation is OFF.

    Then, when i select another of the icons of the family i created i want the first one get deactivated and activate the last one.

  • I have a family called pointers.

    I want that you only can select one pointer at a time, and if you go to select one while one other is actived this one is deactivated.

    Is a stupid thing but after an hour i can't get it working correctly

  • Thanks for the info! . Will be great have some native/system expresion that do that for RGBA.

  • Ah i see, but the problem is that i will have to add every image selected in that canvas to pick the color.

    So, without using the canvas plugin there is no way, other behaviour or plugin to get the rgb values of a sprite? C2 not any native expresion to get the RGB color values at X/Y point?

  • I think this is your answer.

    Gmoney But is using canvas: "(requires rojohound's canvas plugin) "

    I already can do this, the questions is, how do the same for sprites, colors out of the canvas plugin?

  • Using the canvas plugin i can get the RGB values of a pixel.

    But how do the same for an image out of canvas? Is there any behaviour/plugin or expression to do that?

  • For the 2D tool i'm doing you can pick a point in the sprite and drag it to resize it.

    The behaviour on resizing works.... but only when the sprite not have rotation. In that moment all brokes.

    I tried more expresions, some ones works but then i can't resize on negative values(using distance). So i need the resize behaviour like now on scalers but that works also with any sprite rotation but after various can't get it :S .

    Here the .capx

    https://dl.dropboxusercontent.com/u/659 ... blem4.capx

    For drag i'm using the Drag&Drop2 behaviour by Rexrainbox:

    http://c2rexplugins.weebly.com/rex_dragdrop2.html

    oosyrag Can you take a look on this, please?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rexrainbow A lot of THANKS! Now works perfect!

  • rexrainbow It's me or the axis are inversed or something? I set the Angle of the sprite to the drag but is not the same. If you drag the scalr righ the drag slide in other angle ¿? .

    https://dl.dropboxusercontent.com/u/659 ... blem3.capx

    When the sprite angle is 20, the drag is 340. And when the Sprite angle is 20, the drag angle is 340 <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    Or again i'm doing something wrong...

    EDIT: Well i fixed doing : Set angle > 360-Sprite.setangle to get the inverse and now the resize works perfect.

    So this is the way this have to work, or in the behaviour you added the angle in degrees inverse as construct2? I ask to put this in my program or wait to you for invert the angle degrees equal than construct2.

  • rexrainbow I see, when i pinned the object i expected that the drag not affect to them or the execution was first or something.

    If i put only horizontal axis in drag&drop2 and keep the sprite at angle 0, works correct, no matter how much the mouse goes to y. But if i rotate the sprite get problems because the angle/axis of sprite/scaler are not the same.

    So, in the same way you added a restriction of Drag&Drop to horizontal/vertical, is there some way that you can add some event of "restriction by angle" or axis? So with that i can rotate the sprite and drag&drop in the Sprite.Angle without problems doing all correctly.

    Here is the same capx adding a keys to rotate the sprite left/right to see what happens when you try to resize in some angle using Both Axis or H/V:

    https://dl.dropboxusercontent.com/u/659 ... blem2.capx

    So we can say: every tick -> Drag&Drop2 Lock angle at (Sprites.angle)

    And we will can drag and drop objects at the angle desired. Is possible?

  • rexrainbow Here the very simple .capx <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    https://dl.dropboxusercontent.com/u/659 ... oblem.capx

  • oosyrag THANKS!

    Really? All this for you is simpler? damn i want your brain! XD

    cos(anglediff(SetAngle,angle(Sprite.x0,Sprite.y0,Mouse.X,Mouse.Y)))*distance(mouse.X,mouse.Y,Sprite.x0,Sprite.y0)

    XDDD Maybe if you like math or have some skills, but for us, the mortals, is other thing

    Now is apply all this to my program design for every sprite scaler but i hope get working today.

    Again, thanks for your help and time!

matriax's avatar

matriax

Member since 22 Jun, 2015

Twitter
matriax has 114 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies