Alon's Recent Forum Activity

  • Thanks for founding the issue AllanR I scratched my head why it didn't work on my project!

    dop2000 the problem I need to solve is that it will be too many objects to put on the layout which I want to keep clean, this is why I made the "L_SPRITES" Layout to put all the objects I'll create there so I can see them organized and keep adding more and more.

    Is there a way I can still do that with the "L_SPRITES" maybe if I'll put the UNDO/REDO system on "L_SPRITES" event sheet (I need to create) + make the objects Global? I didn't tried it yet, but wondering if there is a solution to make it work when the objects are not actually on the "L_Workspace" layout.

    Any simple alternative solution to NOT put them on the "L_Workspace" ?

  • Hi dop2000 sorry to bother you again, but I had to see if it's just me or something is wrong with the "converting" from C2 functions to C3...

    So I delete EVERYTHING in my project but layers and some layouts to keep the same structure.

    And COPY/PAST your project from c2.

    When I did that CONVERT to built-in functions... I guess something went wrong because I get the exact same issue I had: NO UNDO when Ctrl+Z

    Can you please have a look? maybe it's a minor thing that can be fixed so I can actually use this on my project?

    Maybe there is still a hope for me:

    DOWNLOAD C2 converted to C3 Functions

  • Hi All,

    How do I set a random color for each objects?

    All objects are in one family: "Created_Objects"

    I want to code for the family so it will work for any other object and it's instances.

    I started with this, but of course it keep setting it forever (trigger once didn't do the job and also for each loop failed) so I need to make it work once, ONLY every time I select an instance:

    My unfinished try:

  • Yeah... I guess I broke it real bad, even that won't save the project.

    Maybe I should just make my software without UNDO/REDO (users will be pissed off for such primitive decision) but this event sheet is already huge and I will never find what goes wrong.

    Debug won't help me because I don't know what to look for anyway.

    Don't get me wrong dop2000 I appreciate your help a lot! (I tried to look for you on discord so I could show you the project via screenshare) but you're offline also probably offline.

    I'll see what I can do, messing around with it before I'll give up on such MUST feature.

  • When I try to replicate the code for the clear, C3 asking me for a value to clear the entire array with,

    I think in C2 it's just Clear, and since I'm super confused with Arrays anyway I don't even know what to type there so I put 0 for now (default).

    Anyway, here is the current mess (sorry about it) I tried to cut it to the problematic part, maybe your sharp eyes will get the problem why the UNDO/REDO system doesn't even work with CTRL+Z

    There will be very ugly things you'll see because I tried to follow your instructions (beside the CLEAR part for now because I don't know what value to type in)

    Sorry for the HUGE image, I'm out of ideas already...

    Anything that related to the Creation of the objects is on that GROUP but with the same code you made, it maybe not seen because I fold it for sake if how huge this event sheet is already.

  • I don't know your project and can't help you with this. Maybe when you preview with F5 the event sheet with Undo functions is not accessible (not included into layout's event sheet).

    .

    By the way, you probably need to initialize Undo (clear undo history) after you load ".alon" files.

    OH! I'm not sure but... the UNDO and other "SYSTEMS" are all in one dedicated layout called: "E_MANAGER"

    which included in the actual Layout I'm using, so far everything worked there but maybe the Undo won't because of that?

    Also can you please guide me how I clear the undo history for the load and also...

    Just an idea... maybe as soon as the Software start (f5) it will clean which probably doesn't make sense but worth a try?

  • Is it because you forgot to re-enable UNDO group? :)

    LOL.. no no, both are enabled :D

    I just tested the UNDO group without the SAVE group to stop getting this annoying automatic "Save As" that starts as soon as I test with F5

  • Do you have other "On save complete" or "On load complete" events in your project? Or an action like "Browser invoke download SaveStateJSON"? You'll need to add "isUndoSave not set" condition to those events.

    I guess yes, here is the screenshot of the SAVE / LOAD SYSTEM:

    But even if I disable this group, nothing related to Ctrl + Z works, what could it be?

  • The code on your screenshot is correct, that's exactly how it should be done. I don't know why are you getting "Save as" dialog, must be some other event.

    IT IS?? ok... I wasn't sure at all, that's a progress for me.

    So, just for testing if I disable the:

    Start of Layout > Functions | Call Undoinitialize

    The "Save As" issue won't appear... so I'm trying to look what I did wrong, and how to fix it.

    I don't know how to "start over" maybe I'll rename the "Save As" for fresh test because I don't know how to get rid of this issue so I can proceed.

    EDIT:

    I disabled the SAVE LOAD - SYSTEM group, and the UNDO system doesn't work at all on my project.

    I have no idea what I did wrong even with all the organized groups it is a mess to find the issue, I can only guess it's a mess related to the JSON or whatever data these two systems work with...

    Or maybe because I use Families? (which I must)

    Creating Objects:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • dop2000 I tried to follow your instructions but I made a total mess now whenever I Run the software (F5) it will open the "Save as.." box, so I know for sure that it's not working because I did it wrong.

    I tried to follow your instructions but probably didn't understand exactly:

    1 - I've added a boolean "isUndoSave" for the "UNDO" sprite, false by default.

    2 - Here is where I didn't understand how to apply what you explained to C3 exactly:

    Sorry, the functions and arrays are not something my brain can get easily yet.. I'm trying to follow but as you can see obviously I don't get it... yet.

  • dop2000 Thank you so much for taking the time making this!

    I just had a quick look at your example and not only it's very well documented with everything it is very clean and organized for me to follow!

    The only problem I may run into, when I'll try to replicate this type of code to my current project

    will be the Functions, since it's not an object anymore but a built-in, it works a bit different as "Object.whatever" if there are any on the code (I didn't look for deep yet).

    I do have some questions before I start inserting this way to my project

    1 - Is it limited to X Redo/Undo per session?

    and if not, is it taking a lot of memory because I will create and tweak and move probably hundreds of objects and I would like to make it work if possible also on older machines with less memory.

    2 - Is it easy or complicated to limit to X UNDO/REDO per session?

    3 - Since I'm using the system Save/Load on for saving: "whatever.myfile" will it save the undo/redo from the current session? because I don't need it to save UNDO's of course like most software.

    I'll probably have more questions later when I'll start to put this code on my project but for now I just asked the above before I started looking on it.

    Once again, thank you so much for the help! :)

  • Sorry about the long post and about my bad English, I'm just sharing my experience so far:

    First of all, thanks for the detailed reply R0J0hound what you did for fun, was SUPER inspiring and made me try all day trying to replicate it (with many fails so I kind of gave up) mainly because of the Function didn't work the way I tried and didn't understand how to replicate this action, creating a Function was easy as a Click on the events but using it as the "Sprite" like you did "Function.call" or trying something else was too much for me to follow.

    I like how you managed the all code, organized it in groups (this is why I LOVE comments and groups so much) you really did a nice job!

    Before that I followed a lot of help from AllanR which not only SAVED THE DAY! but also was very creative and I'm trying to combine the both ways of you guys because at the end they worked great!

    The status right now for me is that my project file which became kind of big and messy, is not using a specific code to make a working UNDO/REDO and the other features from my other post which is the main idea so everything will work together.

    I'm trying to learn and understand but I must admit, my brain is not getting much more than basic logic, the other technical programming code and math are gibberish to me, no matter how much I try to understand... and I do have this problem that I LOVE TO LEARN so I can use things like that and upgrade them or tweak them if needed.

    SAVE SLOTS for UNDO/REDO:

    You guys suggested the option to use slots for alternative way, if it's not too complicated maybe I can try it myself and understand how it works by doing it.

    The thing is that I have different events such as drag, drop, resize, rotate, and more to come..

    So I'm trying to understand the basic idea:

    1 - Before any action, SAVE to a slot, for example: "DragSlot" will save before I drag the object.

    2 - Event: pressing CTRL+Z will load "DragSlot"

    But what if I want to undo ANY LAST action, not just dragging (DragSlot)? this is where I get confused,

    Looking at your examples doesn't really translate to logic for because as I said I'm not a programmer, that's why I'm asking stupid questions, after I tried to understand with no luck

    Do I have to use an ARRAY (I understand how Array works, but only on the paper not on C3 or how to use it after Setting it up) maybe I'm an Array'phobic!

    I believe that it is related to the objects UID using 1D array but it's only a guess my brain trying to follow the logic of it, also I have no clue how to translate such thing to actual C3 code.

    I still don't know if I need 1 slot for the UNDO or more? and if more... how do I use them?

    UNDO for size, undo for drag, undo for drop and so on? will this work?

    I'm so sorry for the stupid questions, I'm just trying to understand the nonsense programming events that I see and trying to translate it to more Human-Like logic sense but I guess it's not that simple after all.

    If you guys can explain it with screenshot or some other visual way it will be easier for me to follow, of course if you want I just rather learn instead of copy/past code.

    Thanks ahead for any help!

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