R0J0hound's Forum Posts

  • Maybe scroll to the point you want to rotate from, rotate, then scroll back. It may not work if the engine waits till the next frame to apply it. I haven't tried it though. Worst case you'd just not use the layer rotaion feature and rotate like newt suggests.

    More general control for layers would be welcome. Instead of the parallax controls I wish layers could be moved, rotated from any point, scaled from any point X and y, and why not, skewed from any point. All those are affine transformations and it would make you and I happy to have.

  • "Force own texture" draws the layer to it's own texture first as opposed to directly to the canvas. For it's uses do a forum search for it for lots of examples.

    Also here's an example of a continuous blob.

    https://dl.dropboxusercontent.com/u/542 ... 0blob.capx

    It's not really trig, it's more just interpolating between the old and positions of the mouse and setting the size accordingly.

    Notice when moving fast you can see the polyline path of the mouse. It can be made smoother by using a cubic interpolation between the points. However, I haven't the time to do it today.

  • johnkx

    It should work. The paster object should default to being completely transparent. If not you can clear it with an action. After that any transparent Sprite should be able to be pasted in as expected.

  • Put all the objects in one layer and give the layer that effect. You may need to set "force own texture" to true.

  • johnkx

    As I recall I didn't add an action to load an image into paster. You can paste objects to it, and then it should save with the paster.imageUrl expression.

  • You can access other instances by iid with sprite(i).x, where i is an instance number. I guess you could make a helper function to pick the instance by a variable and return the iid. I'd just change your drawl one function to take the variable values and do the picking inside the function.

  • I haven't opened the capx, and I skimmed your post. It sounds like the question is how objects are paired when when no picking is done.

    Take this event as an example that does that pairing when there are multiple instances of sprite1 and sprite2.

    Every tick

    --- sprite1: set position to Sprite2

    That is equivelent to the more verbose event here:

    Repeat sprite1.count times

    Pick sprite1 instance loopindex

    Pick sprite2 instance loopindex%sprite2.count

    --- sprite1: set position to sprite2

    You can replace count with pickedCount instead and that will show what's happening when only some of the objects are picked. Anyways I hope this helps, I thought it was cool when I realized it. If I completely misunderstood then I'll be sure to look at the capx and Re-read your post when I get a chance.

    Cheers

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I haven't looked at your capx but images aren't saved. You can however keep the image URL in a variable and then load that URL every time you load.

  • The "pick closest" object condition does that.

  • It's something in nwjs, which is based on chromium, which is made by Google. I found this page that sounds like the issue, don't know if it's helpful though.

    https://github.com/nwjs/nw.js/issues/4669

    Clicking on the object in the object bar should pick all its instances. I use it all the time.

  • Look at the local storage plugin I think. It lets you save stuff so it can be accessed from one run of the game to the next.

  • If you show the events that give a picking issue we may be able to expain what's going on.

    Otherwise here's my first idea:

    Just have your tiny sprites and give them the drag drop behavior. Then do one event to do this:

    On touch

    Pick Sprite closest to touch.x, touch.y

    --- Sprite: set position to touch.x, touch.y

    That would move the Sprite to where you touched, and I'm taking a guess that might let it start dragging. If not then scrap that idea, but if it works you could use a pick by comparison to pick only sprites within a radius.

    Your drag n drop and pin idea sounds like it should work, but I'd have to test it otherwise I can't predict what it would do.

    An alternate idea would be to not use the dragdrop behavior and do it with events.

    global number obj=-1

    On touch

    Pick Sprite by comparison distance(Sprite.x,Sprite.y,touch.x,touch.y)<64

    Pick Sprite closest to touch.x, touch.y

    --- set obj to Sprite.uid

    Is touching

    Pick Sprite by uid: obj

    --- Sprite: set position to touch.x, touch.y

    On touch released

    --- set obj to -1

    That should work. Now you can also save the xy offset when you touch and use that when setting the position to keep the relative offset.

  • Something is amiss with your plugin. You'll need to debug it, aka find at what point it fails. It could be anything really.

  • The JavaScript command "print()" will print the page. I guess you can also print an invisible page too using an iframe:

    https://developer.mozilla.org/en-US/doc ... e/Printing

    So from what I can tell you can snapshot the canvas and create a new page with JavaScript that has the snapshot red image and print it. To center the image on the page you'd use css as I understand it.

    At least that's the right direction to start tinkering.