keepee's Forum Posts

  • The object used with the for each collision pair is always the first object. So it just loops over collisions with that object type.

    i'm really confused by this sentence, it sounds like you're saying that on every iteration of the For each collision pair loop, that the CollisionOtherObj is always the same, first object? but i know that isn't true..

    I made a tiny capx with my problem, it's a little different to what i originally said because I used ball/box for ease of explanation, but really it's multiple of the same type of object so maybe that's relevant?

    I made it so For each Ball, For each collision pair, lower the opacity of the CollisionOtherObj. The behaviour I expected (and need) was for everything that is touching the ball to get lower opacity, and this seems to work until two balls touch (lol), then the one that stayed in contact with the ground somehow seems to be only be picking itself in it's CollisionOtherObj, or does it remain in the other balls CollisionOtherObj?

    If this isn't a bug and i'm just misunderstanding, then how would I go about achieving what I described, where the ground below the ball remains low opac even when the ball collides with another on top of it

    https://www.dropbox.com/s/3w1ibhpakix8l ... capx?raw=1

    Here's a vid of what I described

    https://dl.dropboxusercontent.com/u/533 ... oblem.webm

    thanks!

  • is there a neat way to get the UID of the other object within a 'for each collision pair' loop?

    so kinda like .ContactOtherObj

    .CollisionOtherObj does not work because:

    1. Box comes into contact with Ground, so Box.CollisionOtherObj becomes the Ground.UID

    2. Ball hits Box, so Box.CollisionOtherObj now changes to Ball.UID

    3. The Box remained in contact with ground

    So now, even though the Box is still in contact with Ground, and we can get other data about the contact with Ground, we can no longer get the Ground.UID. Or at least it doesn't seem like it?

    thanks!

    btw sorry for not getting back to you about that error message a while ago, it just stopped happening completely shortly after I posted and I have no idea ¯\_(ツ)_/¯

    edit: also shouldn't "For each Collision pair" really be "For each Contact pair" ? or am I misunderstanding how it works.. it seems to run when things are in contact rather than just on collisions

  • hi rojo,

    i'm not sure if this is supposed to work, or if it's a limitation

    hit space during preview to paste the two lights:

    https://www.dropbox.com/s/2qvvmfpzeddim ... capx?raw=1

    the objects sprite is white, but the object has Tint effect to color the instances differently. The blending mode set to additive

    on start of layout, the red and green sprite combine to make yellow, after its pasted, it loses that additive appearance.

    thanks!

    edit: some more info:

    the additive appearance works if you have coloured sprites -without- the tint effect: https://www.dropbox.com/s/fbyi61fgv5v9z ... capx?raw=1

    (but it is not practical for my game without tint)

    and of course, the tint effect works by itself: https://www.dropbox.com/s/1zczb6jzpqlqx ... capx?raw=1

    So my problem only exists when both Tint and Additive are combined

    One work around I was going to do was that i go without tint and make a function that creates a (tintless) overlapping Red, Green and Blue additive sprites, and simply vary their opacities to get the exact RGB value appearance I want. But I thought i should check with you first! thanks

  • hi rojo, i'm getting this error, it's erratic so sometimes I get it, refresh (changing nothing at all) and then it works fine. (happens about once every 10 times)

    Javascript error!Uncaught TypeError: Cannot read property 'x' of nullhttp://localhost:50000/rojoChipmunkBeta_behavior.js, line 5173 (col 25)This may be a bug in Construct 2 or a third party plugin or behavior - please report it to the developer following the bug report guidelines. Subsequent errors will be logged to the console.

  • Solved it.. I just have to use "is NaN"

    silly me

  • korbaach Naw, the string "10" does not equal to the number 10.. that's a good idea though I thought it would fix it for a moment.

  • Sup guys.

    This is an interesting little problem that I've somehow never ran into before. I feel like I may be missing something obvious.

    I think this image conveys my problem clearer:

    One thing that I thought would work was to use int(), thinking that int("10") would give 10 but int("string") would give me NaN.. but int("string") actually returns the integer 0. So this can't be used as it would turn "Apple" into 0 and then claim it's a number.

    Thanks for help

    edit: solved it, I was missing something obvious, I just have to use the "is NaN" condition.

  • try adding the second condition:

    card | pick top instance

    it is at the bottom of the conditions list, after you pick the card object. Called "pick top/bottom"

  • Problem Description

    sounds in chrome play at their previously played volume for a split second, rather than starting at the volume set in their own 'play sound' action

    Attach a Capx

    https://db.tt/ewNwAlzC

    and here's a video in case you aren't hearing the bug

    https://db.tt/urZEsKQW

    Description of Capx

    plays a pop sound repeatedly, with a slider that controls volume

    Steps to Reproduce Bug

      lower slider position inbetween pops, lower from max to min for the most obvious effect

    Observed Result

    the pop sounds like it starts playing at the previously played slider volume, for a split second

    Affected Browsers

    • Chrome: YES
    • FireFox: NO
    • Internet Explorer: seemingly not but the sound is fucked

    Operating System and Service Pack

    win 8.1

    Construct 2 Version ID

    198

  • hi R0J0hound, choosing 'Is disabled' condition gives us 'For each collision pair' instead. This seems to be the only bug of it's kind

    and a thank you for this behaviour

  • rexrainbow that's what I thought.. do all behaviours have to run before events? If so, I didn't know that.

  • rexrainbow, good idea this works okay thanks!

  • Hi rexrainbow I think I found a bug..

    The behaviour seems to lag one frame behind, if you have many rays spinning around very fast you can see it easier, like this:

    https://dl.dropboxusercontent.com/u/533 ... xlight.mp4

    https://dl.dropboxusercontent.com/u/533 ... light.capx

    if you manually set light point every frame, it fixes it but is slower.

  • Try Construct 3

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

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

    I was wondering it it's normal or a bug that the bnickname behaviour only works if that object is already present in the layout, whereas the 'assign nickname' action works fine without.

    Currently I'm keeping all my object types in separate layouts for organization, (the game creates levels from scratch in a blank layout) and I'm using a huge list of 'assign nickname' actions on start up. It works okay, but is problematic for other reasons and is just inelegant.

    Also, earlier in this thread you mentioned setting the nickname plugin to 'global' but I'm not seeing the setting either. Is that maybe related?

    thanks in advance.. also thanks for this plugin! this is essential for larger projects i think

  • Katala, it's working fine for me