Alon's Recent Forum Activity

  • UPDATE:

    I just tried to follow step by step from R0J0hound and create each event one by one to my project (disabled my old code) just for sake of curiosity, but I got confused on the very first part with the functions because the new C3 functions are built in and when I try to replicate how it's done in the C2 version code it's not working the same because the function is actually an object so part of the code for example one action is related to it as an object: Function.Call("new id") which I cannot do in C3 since it's not an object.

    Wish I could understand this all thing and code such thing and learn from it, but I guess it is much more complicated for my simple logical thinking brain. too bad for me because I was really impressed of how it works.

    I guess I will have to make my software much more primitive after all.

    The reason I want to actually understand at least some of the code is that I will be able to tweak and change it when needed, but unfortunately I'm not a programmer but just an animator who can think nothing more than logic things in my brain. (If Then Else... = Result!).

    I'll keep trying to find some other ways to make my software... usable so the users won't get annoyed of how primitive it's functioning.

    Please feel free to share any suggestions, tips, tutorials or anything helpful for to help me out are more than welcome! :)

  • OH MY! very impressive example R0J0hound! thank you for taking the time to make this.

    The selection, duplicate and rotation feels very "Windows'ish" which feels really good!

    To be honest I don't know if I can replicate this complex code to my project, because it is VERY different from my current code, but of course I can try because it is very useful!

    I already know that I may get issues because:

    1. Obviously, by looking at the code I don't understand most of it (blame on me).

    2. In my current project I click to create objects in random variations based on frames (you can see on the clean example I posted) the layout starts with no objects, so I have no idea how to make your code to work with creating different objects instead of pressing "a" to create a specific 1 type of object because of the all confusing UID which is new to me as well.

    But you and Allan made me very curious about these different solutions, it's amazing!

  • WOW!!! for a work-in-progress UNDO/REDO system it works very well!

    Not that I know how it works or understanding.. but maybe for the best way for the Angle Rotation solution is simple as to "store" (or however it works) once you DROP the key / unpress since it's a HOLD action.

    So from the start press to once you unpressed, I'm not sure if it can work but.. just thought about it.

    In my project, I have tiny angle rotation like this one, and also a one that snap 45 degrees every click (when you hold SHIFT + X / Z) but on this one I wanted to keep it as clean and simple as possible for making the rest of the code-magic you put so I can find it.

    Feel free to update on this whenever you get the time, I'm still going to replicate the first part before I'll look into the UNDO/REDO just to make sure everything works before I move on.

    Dear AllanR thanks a lot for your time and afford and most of all your kind help and patience!

  • Thanks for the explanation and example files guys!

    I still didn't have a chance to replicate the code to my actual project, but will do that soon it looks so efficient I'm very happy about this way and can't wait to test it.

    I did understood what UID means, but like I said on my last post, I didn't understand exactly how C3 will know which UID to pick? will it pick the one that the mouse cursor is over based on the top event: "Pick Top instance" ? or it's picking it's UID (the actual object number) from a different way?

    It's not critical because everything works, but as you already know me AllanR I love learning rather than just copy/past, this is why I'm asking how it's actually picking the number of the object, based on what?

    I will check the flashing example kidswithcrowns with the functions and family as well, looks interesting and efficient way for me to learn how things are working, thank you for taking the time both of you are amazing!

    Anyway, I'll make sure to try replicate Allan's version to my project asap, before things will get even more complex... I'll probably going to have more ISSUES hopefully you guys won't get tired of my stupid questions to come.

    Sorry about my bad English and big Thanks! :)

  • WOW! You did save the day AllanR! Thank you so much!

    I still need to explore and understand how the all UID works, because it says Created_Object.UID without a specific number so I'm not sure how C3 knows which UID is the picked one... (never used UID before, it's NEW to me). I'm guessing that C3 will look at the Top Instance it picked (from the main event) and it will GIVE it the UID? if so... I'm close to understand it? I'm not sure hehe

    I will now try to replicate this type of code to my actual software (it is already getting HUGE) compare to the current clean example I shared, I hope it will work and I won't do a mess.

    OFF TOPIC:

    Do you think it is possible to apply that UNDO/REDO system we discussed on my other thread to this clean example so I can see how it looks and hopefully will be able to understand it?

    Thanks for everything! I'll start make these changes (can't wait to see it work!)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I made a simple example that works PERFECT (without families or functions) just to show the issue and what I'm trying to solve inside the file using comments.

    Hopefully somebody can help me solve this before my code will become HUGE with ZILLION of events that does the same thing for each (that's the key "FOR EACH" I know... but can't solve it yet).

    Maybe using 'Families' and 'For Each' maybe 'functions' I have no clue, but there must be a SIMPLE way that won't confuse my simple brain.

    Maybe AllanR can you save the day? ;)

    C3 File Attached - Please have a Look, Thanks ahead!

  • Thanks for the reply kidswithcrowns

    To be honest I have no idea how to do what you suggested, your explanation make sense to me because it should know on which instance of the family the cursor is over.

    But to be honest I have no idea how to do that, I never used pick UID or the new functions, can you please share an example or screenshot of how I should solve this?

    Also, I don't know how to let that function know which UID to pick because I keep creating new instances on a click of a button (they are not appearing without me creating them). so it's confusing for me to follow logically, beside the code part.

    Thanks ahead!

    This is the mess I did, obviously there are lots of guesses and I'm not even close, just sharing:

  • I'm trying to convert all my individual Instances events to one general Family for more efficiency and less events.

    For example I have an event that whenever the Mouse Cursor is over instance it will Flash (using the Flash Behavior).

    When I tried to convert it to a Family to affect other objects instances I found out that... there is no Flash Behavior for Families.

    So I made a simple Function to make the Flash-Effect, but again.. with or without "For Each" I can't get this to work right.

    Can somebody explain? or if it's confusing (for noobs like myself) add an example file or screenshot?

    Thanks ahead!

    Work in Progress so far:

  • Thanks for the quick reply Elliott

    I guess it doesn't work because the Layer doesn't take multiple parameters, as you mentioned (I had no idea, it's good to know!).

    I tried to add comma between but I get Syntax Error so I guess I'll just go with the extra lines.

    It will get messy when I'll have more layers but.. oh well, at least it works. :)

  • Hi All,

    My goal is to exclude some layers when taking a snapshot, when file saved, bring them back (visibility).

    When I include the layers one by one, the code works PERFECT! as I expected.

    But wen I tried to make it more efficient in 1 line, as I used the "&" it's not working.

    I'm aware that all these Sub-Events are not needed, I just like to see the separation.

    I must be missing something really stupid... can someone please help?

    Tagged:

  • Thanks for the explanation and help, I will wait to see what you'll come up with! :)

    OFF TOPIC: (hope I will be able to apply the UNDO/REDO system to this)

    I used a different Drag n Drop solution for selecting Objects with much simplistic way for now, so my code will probably won't fit to what you're doing since you'll do it based on your previous code.

    My Drag n Drop solution based on a "Pan_Tool" object that have 3 modes:

    1st Mode is turning OFF (invisible) the tool

    2nd Mode is MOVING ALL instances on the layout

    3rd Mode is MOVING ONLY selected instances (based on SetColor) so all the colored can be moved.

    For now I press 'SPACEBAR' to change (cycle) between the modes if I need to move more than 1 instance.

    This simple "Pan_Tool" is always centered on the layout, After I Drag it to anywhere and DROP it, it will get back to the center. I know it's not the most efficient way but it was the only creative way I could came up with for a very simple code that my brain can actually understand.

    Back to Topic:

    I hope that I'll be able to follow it and apply it to my code even that it is very different.

    Thanks ahead for your kind help AllanR!

  • Thank you so much dop2000 it works like MAGIC! :)

Alon's avatar

Alon

Member since 20 Feb, 2014

None one is following Alon yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies