Pandy's Forum Posts

  • BadMario

    Enabling/Disabling collisions results in all instances of an object having its collisions Enabled/Disabled. That makes things more complicated having to add more objects and events just to filter collisions.

    If you have 10 physics enemies, and one platform. You want enemy(1) to jump down (not collide with platform so it can move down) .Disabling collisions will disable collisions for all enemies and all will fall down.

    If you want individual control than you need 10 different physics objects as enemies and that means events for each enemy. This is a simple case, what if you want more enemies and more platforms? This just limits what you can do.

    But if you had collision filtering per instance than you just need one enemy object and one platform object and add how much ever of them you want.

  • WackyToaster

    Ah crap I did not see that it is for C3. I got to this thread from google search. But I think there should be some similarities between the two behaviors. I'm guessing nothing new is added from C2. I managed to get collision filtering working but I have run into some bugs. If I fix them I'll reply to this thread and reference you again. Then maybe we can see what can be done for the C3 behavior.

  • WackyToaster

    Are you still looking for collision filtering in the standard C2 Physics engine? Reply if you still need it I can help you out.

  • valerypopoff

    Oh thanks. I just saw your example files, and didn't think about checking the properties bar. I didn't see the 'Learn how' button at your site and missed it. Sorry for the error on my part.

  • It was nothing. Just trying to call a function when 'All scripts were loaded' fired. Nothing else.

    cdn.discordapp.com/attachments/508660646704054275/511517237954347018/html2canvasTest.capx

    I just made this now since you asked. I was checking the console for errors. It comes up as html2canvas is undefined.

  • I just get 'html2canvas' is undefined. But I think that's more of an error in my part in trying to make it work with your plugin. And it's actually not a screenshot but just builds the representation of the page or element on a canvas. Again, I'm a noob at js and don't know what I'm doing.

  • valerypopoff

    In C2 you can have form control elements like buttons and lists etc

    static4.scirra.net/images/fresh/c2/gallery/large/png/plugin-list-02.png

    But these elements cannot be grabbed by the native 'canvas snapshot' feature or pasted by R0j0's paster plugin, for whatever technical reason. Something about them being rendered on top of the Construct2 canvas.

    Basically if you have a project with one sprite and one form element button. And did a 'canvas snapshot', and viewed the image, only the sprite will show up. The button would not.

    Looking around I found 'html2canvas', which does let you to take snapshot of these elements. Was just wondering if it can be used on C2 with your plugin. I don't know if it is possible or not tho. Or how to implement it if it is. I imported the linked js files and tried to see if it worked, but kept getting errors.

    Edit: To be more clear the 'html2canvas' approach is that they create a representation of the page inside a canvas. They don't make an actual screenshot, but builds it based on the content on the page and the loaded stylesheet. It could be used on the entire body or just a specific element.

  • valerypopoff

    html2canvas is a way of taking screenshots of form elements like buttons. Normally the paster plugin or the canvas snapshot feature can't paste or grab buttons, lists etc, but apparently this html2canvas does something to mimic these form elements in style and then takes a screenshot of it which we can use.

    I tried to use it, but honestly I haven't got the slightest clue how to get it to work or if it is even possible.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • valerypopoff

    Forewarning that I'm a noob. But can you tell me if it is possible to get the below to work in construct2 with your plugin? And if yes, how to do it?

    html2canvas.hertzen.com

    github.com/niklasvh/html2canvas/releases

    Thanks

  • R0J0hound

    The custom draw plugin also does not seem to have a set Z-order option.

    Also I set up a discord where I can I ask you for help. If you are interested in joining (and the burden)

    discord.gg/vV7nD8 (link expires in a day, so if you see this later it won't work)

    If not I understand.

    Thanks

  • I just added a tint effect and set all its parameters to change to the sprite's z value in event 14.

    i.imgur.com/fw77tOE.gifv

  • R0J0hound

    Wow. thanks for this, this will help a lot of us.

  • R0J0hound

    Oh thanks for looking into it. I kinda just forked it from things I found from google searching. I have ~0 knowledge of JavaScript (if any) and to be honest C2 is the only thing I am familiar with.

    I indeed was switching between polygon and paster. I just left both in as an option. Polygon has a 'draw line' option which helped distinguish the cubes. Paster is in much lower resolution and as the performance was already slow I didn't attempt to see how it would look if I increased Paster's resolution.

    What I attempted to do was to only calculate the 3D view of one cube at the center, and then to just apply it to the rest of the cubes, maybe helping in performance. But I couldn't figure it out. As it is now it calculates the view for every cube.

    I think it would be great if everything could just be done in javascript for performance but that is way beyond my knowledge.

    I will define the function onStartOfLayout and see how it goes. Thanks

  • R0J0hound

    Do you have a discord or any means of privately messaging you? I need your feedback on something. Might as well post it here, doesn't have to do anything with chipmunk

    cdn.discordapp.com/attachments/183566321156358144/502108488869085196/rot.capx

    Was trying to make a voxel type editor but it is not very efficient at all.

  • rexrainbow

    There seems to be a bug with 'Set Position'

    Every tick UID2PROP Set Sprite Position Mouse.X, Mouse.Y

    This only changes the Y property, and to the first parameter, that is the X parameter and not the set Y parameter.

    So Set X to 5 and set Y to 20 will result in the sprite's X being unchanged and it's Y being changed to 5 (instead of 20)

    UID2PROP 'Set X' and 'Set Y' works correctly individually .