R0J0hound's Forum Posts

  • Use the search.

    search.php

    Nothing comes up with the keywords of your title: "breakable tilemap".

    So use good old google to find synonyms for "breakable".

    https://www.google.com/search?sclient=p ... +breakable

    Destructible looks good.

    Profit:

    search.php?keywords=destructible+tilemap&terms=all&author=&sc=1&sf=all&sr=posts&sk=t&sd=d&st=0&ch=300&t=0&submit=Search

  • Search first.

  • Prominent

    I do not understand what is happening here.

    If in the editor

    sprite2.angle = 95

    sprite3.angle = 240

    And you make an event like:

    Start of layout

    --- create gear joint with phase = sprite3.angle-sprite2.angle

    Then sometimes the objects will rotate 360 before settling.

    However if you set the angles with events then it's perfect.

    Start of layout

    --- sprite2: set angle to 95

    --- sprite3: set angle to 240

    --- create gear joint with phase = sprite3.angle-sprite2.angle

    or you even can do this:

    --- sprite2: set angle to self.angle

    --- sprite3: set angle to self.angle

    --- create gear joint with phase = sprite3.angle-sprite2.angle

    EDIT:

    Ah, I see what the issue is. Internally in C2 angles can be any value. When you access them however, they are always returned in the range [0,360). So it would be a fix from my end. Till I do that the above solution will work.

  • Here's a link with some ideas:

    http://stackoverflow.com/questions/2165 ... y-web-site

    None of them seem perfect though.

  • Try Construct 3

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

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

    It's hard to say without a capx. It would be odd if the joint got offset but I suppose it would depend on the joint type.

    Is the dragging similar to this? (from the first post)

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

  • The "else" isn't needed, and the negated != is a double negative, wouldn't it be easier to just check "="?

    This should work. You pick the searcher instance like you have, then you filter the targets that meet the condition, and pick the closest from them.

    Searcher: pick by uid [something]

    Target: var = [something]

    Target: pick closest to (searcher.x, searcher.y)

    --- do something

    That leverages the picking system. If you want to do it a code way you can just use "for each" and "system compare" (same as a if). You can think of a uid as a pointer.

  • You can use the .asJSON expression and the "load from json" action to copy one object to another. For example if you want to create a Sprite that is a copy of the Sprite with a uid of 2 you could do the following.

    Global text template=""

    On click

    Pick Sprite by uid 2

    --- set template to Sprite.asJSON

    --- create Sprite at (0,0)

    --- Sprite: load from json template

    --- Sprite: set position to (mouse.x, mouse.y)

  • You could use a variable to temporarily store the current group as you loop over the passages you're overlapping like this:

    global number curGroup=0

    finn: overlaps passage

    for each passage

    --->set curGroup to passage.group

    --- pick all passage

    --- passage: group = curGroup

    ------> passage: set opacity to 50

  • Look at blend modes, with them you can do masks which is similar to the effect in the link. There is a blend mode example that comes with C2.

    A simple how to would be:

    Add a layer

    Set it's property "force own texture" to true.

    Add a Sprite to that layer that you want to display.

    Add a second Sprite for your erase mask. Set it's blend mode to destination out.

    Now the second Sprite erases from the first where they overlap.

  • That's pretty cool. The art gives it a lot of polish.

  • Maybe ask the people who said they hate Nintendo. I wasn't aware anyone on this forum did.

  • The uid is unique per object. You can find what a created object's uid is with the .uid expression of the object. The new object is picked for the rest of that event or until another create action.

    Every 1 seconds

    --- create: Sprite at (random(100),random(100))

    --- text: set text to Sprite.uid

  • If you want to create an object by name this plugin will help:

    Personally though i'd either just add a event per type to create it or put them all into animations.

  • [quote:3mkuwc53]EDIT : I was able to resolve this - Pasted a color palette image onto canvas. But after pasting the image, I lost some resolution of the palette...does the canvas paste use a color loss/reduction algorithm?

    It doesn't but I have seen the color loss too. No idea how to correct it.

  • Either of the following would work. Either you just specify what way you want the object to do when you create it, or you can pick it by "pick nth instance" or "pick by uid" or something.

    Start of layout:
    --- create: ball at (random(320),random(480))
    --- ball: set angle to 0
    --- create: ball at (random(320,640),random(480))
    --- ball: set angle to 180
    
    every tick:
    --- ball: move forward 100*dt pixels[/code:26fx4ael]
    
    [code:26fx4ael]Start of layout:
    --- ball: destroy
    --- create: ball at (random(320),random(480))
    --- create: ball at (random(320,640),random(480))
    
    system: pick 0 instance of ball
    --- ball: set x to self.x+100*dt
    
    system: pick 1 instance of ball
    --- ball: set x to self.x-100*dt[/code:26fx4ael]