matriax's Forum Posts

  • Seems is impossible do it for the pointer so, how can i do it for a sprite?

    Some perfect will be limit the movement of an object to a given angle.

    With drag and drop with Axis in Both i can drag everywhere. And with horizontal or vertical i can move the object in X or Y axis.

    But how i can set a custom angle to drag the object?

    If not with drag&drop what plugin/behaviour i have to use?

  • At least, any idea that how to lock the sprite movment to an angle? To move it by the RED Line? (the sprite angle)

  • It's a great start on a tool

    It gives me hope that I'm not the only one that has thought it would be possible to make tools with C2.

    Thanks! Starts as a personal program for my needs but i will share in case can be useful to other people.

    --------

    I searched more in the forums and plugins/behaviours but i was not able to find nothing to do that , maybe i will have to ask somebody to make a plugin for it.

  • I found a Mouse Lock Plugin:

    I asked the author if this will be possible. I not understand very well the plugin and some things i tested the app crashed so maybe with last updates is not compatible :S .

  • TiAm with this plugin is possible lock the mouse to move only in a given angle? How can i achieve that?

  • I wonder if you could make this work with Rex's boundary plugin.

    You might have to lock the mouse onto a object, and use boundary on the object.

    Take a look at the plugin and see if you can figure it out, if not I can try to throw something together as an example.

    Justin

    PS: I'd love to see what progress on your tool You've made.

    antares330 Thanks for the reply i'm goint to try that

    THis is the tool at the moment, nothing big actually:

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

    You can resize(WIP), rotate, change opacity, change the Z-Index order and import/export the project composition. Also you can import external images that will be saved in Base64.

    Is focused to work with sprites, no draws or pixels. Still is all a bit mess, will see <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

  • I'm doing a 2D tool.

    I can rotate and resize an object but i need that when the mouse drags a one dimension scaler(horizontal or vertical) lock the mouse to move only in the RED line angle to set the size.

    Actually works fine the size because i blocked the rest of the points. But you can move the mouse everywhere when you get some point to resize, and for the one dimensionscaler i want to lock the mose in the angle to be resized.

    Is possible? how?

    Or At least move the sprite only at given angle?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    yes yes, i saw it after the publish post sorry , but the others not. I saw a solution by you using a for with loopindex,etc... to detect no key is down. But well better if they are events to be more easy to use.

    New keyboard & mouse condition like:

    • No key is down.
    • No wheel button down
    • On mouse Wheel button clicked
    • No wheel mouse buttons is pressed
  • I think we are saying the same thing.

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

    blackhornet Yes is the same way. Adding the name or Zorder is only necessary when the object is created, and can be different in multiple ways i still don't know so is integrated in the button object of each type instead in the big events thing at the moment.

    So yes, this is all, thanks for your help and the time to reply, very appreciated! <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

  • blackhornet And each function called by the button will have all the properties plus all events and their repetitive events for all buttons.

    I want separate the unique properties for each button and one function with all the events that have in common all the buttons will be pressed for creating sprites.

    I don't know if i explained well, or i not understand you well XD.

    ----------

    On button Circle:

    Set Unique Properties for the circle

    On button Square

    Set Unique Properties for the square

    Lots of events shared by the same actions:

    Actions : On created, On Drag Start, On Touch,etc....

    Evens that runs after this conditions: Select, set textboxes, set sliders,etc...

    So if i want to add a new sprite type i create a button with the unique properties. And if i want to improve the things you can do for the sprites i add an event on "Lots of events shared by the same actions:".

    This is my actual design, what is the way you saying?

  • You can't use "On created" as that is called during the Create action - you don't set the name until the next action, so there is no way to get the data until after you've set it.

    blackhornet Ahh i see obviously! i thought the "on created" works after the event button cliked is finished! :S,

    Not have to be specifically "on created", an action that occurs one time that can detect a new sprite has added wil works.

    I have now:

    On created(Tha is the one only works at the moment with Wait0s)

    OR

    Drag&Drop Start

    OR

    On touch

    Then -> Select, set name, set Zorder, set opacity to slider,etc...

    Mmm, maybe there is some action that detects when the "On button Clicked" event is finished i guess will works too.

    If not well, if only is one repetitive event inside the sprite types creation not is the desired but if there no other options and well i guedd i can use to do other future things that needs to detect the end of the button event i guess.

  • Not intended to use with 'on create'. Just as a standalone event. This will always write the last created one in the textbox. (sorry was evident for me)

    If you need to use the 'on create', then use what blackhornet suggested, works because the pick by UID always works, no need to wait till the object is actual added to the IID list (pickable).

    99Instances2Go Don't worry! i understood you correctly, without OnCreated, but in the code i put a solution that works like yours but the "textbox" is not editable, and i need it to use for rename the sprite.

    blackhornet THANKS!, Yes, works without WaitXseconds.There will be any way to do the same without put a function/event in the On Button clicked ?. As i said in the code "And the box_sprite_name event have to be out of the button "on Clicked" like now." i guess i explained bad i mean none event for that inside this ones.

    Why?, now for each sprite type i want to create i have to add this function. While "On created Sprite" I can add all the functions and events i want to do, only one time instead of repeat the same actions/events in all the buttons. Is there anyway? Sorry for not be totally clear.

  • Pick all Sprite

    Set TextBox as Sprite(-1).name

    ?

    99Instances2Go Works but the textbox can't be edited. If i put "On create" the first click on create not show nothing in the textbox, and for the next appears the name of the previous object name. Adding the "Wait0s" your solutions works "on created" <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz"> .

    Here is the .capx edited with your solution added in the bottom(Event 8), maybe i misunderstood something:

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

  • Works, but still prefer a solution without WaitXseconds. And thanks for the link i'm going to read now, looks interesting!