R0J0hound's Forum Posts

  • 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

    • Post link icon

    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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • There isn't but you can break it down into simpler problems.

    The first is to have an object follow a defined path. There are a few solutions you can find with a forum search, including some behaviors to help out.

    The second problem is to position an object an radius from another. Again a forum search for orbit will come up with a few ways.

    Here's one possible implimentation

    https://dl.dropboxusercontent.com/u/542 ... ollow.capx

  • Here's one idea:

    The first two events are the relevant ones.

  • Figure it out for a top view first, then you can transform the positions over to isometric. My idea is to have the terrain be a grid of points at various elevations and then you just find where the player is on the grid and interpolate between the nearby elevations to get the in between elevation.

    At least that's the rough idea. Here's a proof of concept of the idea:

    https://dl.dropboxusercontent.com/u/542 ... rrain.capx

    Half of it is just generating the terrain.

    Now another idea could be to layout the level in the editor and put a bunch of invisible sprites over the terrain and see what the player's feet is overlapping and somehow alter the speed when walking over slopes. Maybe something like this:

    https://dl.dropboxusercontent.com/u/542 ... imple.capx

  • IGDev

    This behavior isn't really usable for slopes.

  • You can get the json of the canvas with the canvas.asJson expression.

  • A newer variation.

    Or maybe something like this old capx:

  • Here's the relevant original discussion on the third oldest page of "Construct 2 General":

    The CC feature was called attributes and the decision was to replace them with behaviors instead. So a behavior could probably be done to implement a destroy on startup.

  • RBuster

    I don't apart from duplicating events. The plugin is probably causing a hang due to the family and I'd guess it would happen in other browsers.

    I don't have the canvas plugin installed currently and haven't made any time to work on plugins. However I seem to recall a similar problem with another plugin. The solution as I recall is to find the "typeProto.onCreate" function in the runtime and adding an if to stop the function if it's a family.

    typeProto.onCreate = function()
    	{
    		if (this.is_family)
    			return;[/code:1e6bs3fc]
    Maybe that will fix it.
  • Here's some more ideas on how to get the overlapping tiles:

    You can probably get exactly like that pic by first using the raycast plugin to get the collision point then using the idea above to get the hit tile.