ProceedToMemory's Recent Forum Activity

  • Hi is this close to what you're after?

    Edit: slight change to capx

    [attachment=1:lyho8d1d][/attachment:lyho8d1d]

    without for loop

    [attachment=0:lyho8d1d][/attachment:lyho8d1d]

    Perfect, many thanks!

    I actually had another variable on the door to determine whether it's default state was "open" or closed" at the start of layout, but I've added that in myself and it works just fine.

    So it seems changing the toggle state to the switch instead of the door fixed it? Can you give any insight as to what was going wrong with my first attempt? Apart from all the unnecessary for loops

    EDIT: Just read your edit. I had gone through a previous attempt with families but thought that might have been clashing with something and reverted back to the individuals. Honestly I had gotten to the point where I wasn't sure which part was wrong and whether each change I made was breaking something else. I now realise I was over complicating things.

  • why not use a boolean variable and toggle it when over the switch?

    would probably be even easier when putting the doors in a container with the switch, but for now instead of the "for each door system compare" you should use system pick by comparison door : door.doorID = switch.switchID

    Hmm, I've changed the for loops to the system compare but it still seems to be acting the same. I believe I tried a boolean method in an earlier attempt but it didn't seem to make much difference. I mean it's still switching between two states as it is.

    Just noticed that if you create a block on top of a switch it will toggle it, but when destroyed the switch and door will not return to their original state. They just don't seem to work properly at all. Maybe something in the "not overlapping" events is not triggering, or I have it coded completely wrong? What's odd to me is that it works with the player characters one at a time, but breaks if two switches are pressed simultaneously.

  • Hey all,

    I'm having a bit of trouble figuring out the logic for a little pressure switch system I've put into my game. The toggling works fine if only one switch is being stepped on at a time, but as I've started to implement extra characters etc, the results start to get a little crazy.

    I've tried to comment the capx as clearly as possible, so hopefully you can get the gist of what I'm trying to achieve.

    https://www.dropbox.com/s/v2dnvwv2jc1qo89/DoorTest.capx

    Extra instances of objects seem to break it the most, namely the spawnable blocks. But if both players are standing on both switches, it also seems to wig out. I've also tried using families but couldn't seem to make a difference. I have a feeling I'm either using too many/not enough For Each loops, that's usually what trips me up with these kinds of things.

    Any help is much appreciated!

  • I'll try to explain see if I can make sense

    You were getting the distance using "fireball" X&Y to "moving platform" X&Y, so distance(fireball.x,fireball.y,movingplatform.x,movingplatform.y). So it's actually calculating the length of a diagonal line which is why your version always seemed to be longer than it should.

    My version used distance(fireball.x,fireball.y,fireball.x,movingplatform.y) so since the "X" stayed the same the line calculated is straight.

    Hope that makes some sort of sense. I'm bad explaining with words that's why I usually create examples.

    Ah, that makes sense. So simple in the end.

    Thanks again.

  • Here's a fixed version. I think it's the effect you are after.

    [attachment=0:2ofl3yby][/attachment:2ofl3yby]

    Perfect!

    Would you mind running me through the logic of why that fixed it?

    It seems simply removing the X of each object and repeating the X of the Fire did the trick? I didn't know you could use repeated co-ordinates like that.

    Thanks a whole bunch.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, so I sort of have this working already, only it's a little wonky and I can't seem to figure out why.

    Here's my capx: https://dl.dropboxusercontent.com/u/96804667/Test.capx

    In the example, I'm trying to get the "FireFall" sprite to alter it's height depending on the object it is currently overlapping.

    As you can see, it does indeed alter the height, but it still overlaps the object and is just not as accurate as I'd like it to be.

    The wider the object/Fire, the more trouble it has finding the correct height, which is why the Player sprite seems to work almost perfectly, but the Moving Platform is way off.

    Am I missing something super obvious here? I feel like I am. Should I possibly be calculating the width as well?

    Thanks for any and all help guys, this is starting to drive me nuts.

  • One idea is you could put a sub event after your event 3 along the lines of

    while

    icicle is overlapping block -- move icicle 1 pixel at angle 180

    It would need some more thought if you can fire left as well as right...

    edit - another thought is just after you create the icicle move it in the z to behind block (this is a bit of a cheat but should look ok)

    The "While" sub event seems to have fixed it, wasn't sure how Loops and such worked so this knowledge might come in handy for future problems as well.

    Sorry for the late reply, the help was much appreciated!

  • Hey all,

    I was wondering what the best method for implementing precise bullet collisions might be?

    What I'm trying to do is have the bullet destroy itself on impact with a wall and turn into a platform at the exact point of impact. Sometimes it works perfectly but others it spawns inside the wall, especially when I fire closer to the wall.

    I'm assuming it's to do with the engine not checking for updates quick enough? Every Tick doesn't seem to be cutting it in this case.

    Here's my capx file, hopefully I uploaded it correctly: https://dl.dropboxusercontent.com/u/96804667/Test.capx

    Thanks for any and all help.

  • That's exactly what I wanted, thanks a bunch.

    Although looking at the code, I'm not quite sure how it all works. Do you know of any reading that will outline the basics of this type of stuff?

    I'd love to learn how to do it myself, so I can just fiddle around with it to change the axes etc.

  • Hey all,

    I'm having a bit of trouble getting some physics collisions working properly so thought I'd see if anyone here had any pointers.

    What I'm trying to do is have several square physics objects collide with a horizontal platform with the Sine movement behavior, and then have them rest on top and move along with the platform.

    The problem being, when the square objects hit the moving platform they just stop in mid air and do not move with the platform, then continue to fall when they are no longer touching. Acting as more of a blocker, and not a moving piece of ground.

    I can get around this with the pin function, but that just makes matters worse when two blocks land on top of each other, one being pinned and the other repeating the mid air stop action.

    Am I missing something super obvious here? I feel like I am.

    Thanks for any and all help.

ProceedToMemory's avatar

ProceedToMemory

Member since 13 Sep, 2012

None one is following ProceedToMemory yet!

Trophy Case

  • 12-Year Club
  • Email Verified

Progress

13/44
How to earn trophies