R0J0hound's Forum Posts

  • Are the tiles you want to be solid and the ones you don't want to be solid always the same? Like certain tiles no matter where they are placed should not be solid but decoration.

    If that's the case you could copy the tilemap when the game runs and erase all the decoration tiles and leave the solid ones. Then make the duplicate invisible and make it solid. Basically you'd use two for loops and erase certain tile values.

    It would save you time if you wanted to make drastic changes to the map. Of course it wouldn't work if you wanted hidden walls I suppose, but even then you could mark those in another way.

  • Try looking through the list of addons:

    As I recall there was one that lets you display a webpage inside the game area. Think it was something like "frame"?

  • I had a test, and when you do for example this:

    Start of layout
    --- python: System.Create("Sprite", 1, 100,100)
    
    always
    --- Sprite: rotate 100*timedelta degrees clockwise[/code:36t5neww]
    
    Only the new sprite will rotate.
    
    But if you add a "for each" everything can be picked again.
    [code:36t5neww]Start of layout
    --- python: System.Create("Sprite", 1, 100,100)
    
    for each sprite
    ---
    
    always
    --- Sprite: rotate 100*timedelta degrees clockwise[/code:36t5neww]
    
    It only needs to be done after creating an object from python and even then it only needs to be done once. Also the object used can be anything.
  • A path through paths is going to require some kind of math.

    That spline path behavior and that example you mentioned both satisfy your second requirement to spend the same time between any two points.

    To control the shape in between the points you could use a different spline such as bezier. You can use the qarp() or cubic() expressions to hide most of the math, although you'll still need some math to keep the paths continuous form one pair of points to another.

    dropbox.com/s/k67oxzz6jqt114g/cubic_path.capx

  • If you look in the function object section of the manual you can call a function in the event sheet from javascript. You could then mute it there in the event sheet.

  • That may be due to "double buffering", at least it sounds like it. Basically everything is drawn off screen first, then flipped to the screen. The result is a one frame delay behind mouse or touch input. It's less visible at higher framerates, since the distances between frames is less.

    Now as far as I know C2 has no control over this, the browsers internally handle this detail. It's the same with android export I imagine but there might be a setting. I've never used mobile export so I don't know.

  • keepee

    Thanks for the capx. Fixed now. Re-download in first post.

  • The 8direction behavior only sets the angle when moving. What you want to do is set the angle based on what arrows are pressed.

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

  • Try Construct 3

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

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

    Ok, I see what the issue was. Re-download on first post. The other object will never be the same object now.

    In your example if two balls are stacked only one will get an opacity of 50, so you need an action to set the ball's opacity as well.

  • The ball staying transparent is odd, probably an issue with the physics library itself or maybe a typo on my part. You can fix it by adding a system compare: Ball.Chip.CollisionOtherObj != Ball.UID, so I guess the object is colliding with itself?

  • You can use this to get a list of all the object type names in a cap:

    https://dl.dropboxusercontent.com/u/542 ... peDump.zip

    just change the filename in the script. Also you can filter the dumped list by plugin, so if you wanted only sprites do this:

    for ot in cap.objtypes:
    	if ot.ot.plugin=="Sprite":
    		names+=ot.ot.name+","[/code:f8v9rjxh]
    
    The not "quite an object" issue I think has to do with objects being created outside of the event sheet so it doesn't do the usual stuff to move the new objects to the normal object lists from the new object lists.  I recall messing with that a while back and the solution is to pick the objects with events somehow so it takes care of it, I think a for each would do it.
  • keepee

    That shouldn't be an issue with different object types. The object used with the for each collision pair is always the first object. So it just loops over collisions with that object type.

    No, it's collision pairs. aka two objects colliding. Each collision in turn can have multiple contacts.

    This is a example:

  • I don't a lot of time either. I guess I'm confused with what you want to do. Do you want to re-arrange the units to be in a different formation? Like go from a 5x5 to a 4x7?

    I guess you could pick only the units that need to move like you might be trying to do? A simper way would be just to reassign all of them:

    global number x=6

    global number y=5

    For each unit

    --- unit: set col= loopindex%x

    --- unit: set row=int(loopinde/x)

  • Ah, so I guess families don't work then. Well they do partially but they're setup differently so we get that object is no callable error. Basically it's some issues with the runtimes source itself, and let's say I'm purposely avoiding going that route to avoid a myriad of errors because compiling with a different compiler introduces too many issues. Most of which I was never able to solve.

    So I guess just listing all the object types would work though, barring any other gotchas.

    It's quite the Pandora's box. The work needed to work around stuff or even trying to fix the source itself quickly seems to exceed re-writing something from scratch...

  • More layers I guess. I'd recommend using the paster object to help with this. You can draw to them so you can probably draw one color light to one paster and another color light to the other then blend the two together somehow.