lamar's Forum Posts

  • Yup a global variable for a trigger works.

    You can ignore input from the keyboard but not from touch because if they are using a tablet that would lock the screen so they could not quit or change windows.

  • Did you try the example included in C2?

    Just a matter of making some more tile blocks with the colors you want.

  • Thank you all.

    I have tried to remove different things from the capx, for example effects and behaviors. I think all third party plugins are gone. Spritefont MIGHT be thirdparty but it is needed to illustrate the problem here.

    Are there any way to see which third party plugins a capx use?

    Whichever, I have replaced the file with new capx.

    zenox98 how strange!

    lamar thanks for checklist.

    Went through them, but sadly not helping.

    gif: http://www.funnybunny.se/files/bug.gif

    You might check your graphics card to see if it has crashed. I had sprites doing all sorts of weird things until I checked my graphics card and I had to uninstall and reinstall from boot and then reset webgl and canvas before it started working again.

  • CAPX

    https://www.dropbox.com/s/s0p4clu9lxar5rs/Ragdoll.capx?dl=0

    You can shake, drop and throw that ragdoll off the screen and his joints will come back together.

    That may be the start of a good game for someone.

  • Perfect! That is exactly what I needed!

    Thank you

    You are very welcome!

  • Thank you for the help, LaMar. I will try your ideas, and post here the results.

    It's a thing with physics and revolute joins. For instance, if you add drag & drop to your joints, you'll see how they separate from each other when dragging and if your drag too hard they separate the same way of your example. No solution to that.

    No solution?

    Maybe somebody better tell this ragdoll that:

    CAPX

    https://www.dropbox.com/s/s0p4clu9lxar5rs/Ragdoll.capx?dl=0

    You can shake, drop and throw that ragdoll off the screen and his joints will come back together.

  • Just something I have ran into. Don't suggest you use the windows built in zoom on layout and use the C2 layout zoom instead. I have had problems with sprites disappearing or being resized using mouse zoom when I reloaded the capx.

    Windows zoom tries to reset the layout to whatever zoom you left it at and C2 is trying to put it back in focus causing a conflict I think?

  • You can use a timer so after a button is pushed for so long the animation changes to sprint and you increase the player speed.

    On button down wait 2 seconds, set timer = 1

    on timer =1 set player animation sprint, set player speed to 500

    Something like that.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You would need to keep track of each random number selected in its own variable and then check the new random number against each of those to make sure you are not getting repeated numbers.

    Looks like you need 6 variables and call them R1,R2 etc....

    Looks like Tom has a tutorial:

    https://www.scirra.com/tutorials/315/generating-random-numbers-without-duplicates/revisions/2089

  • Hmmmm?

    Looks quite a bit like my Spelunker platform builder only with some different tile sets.

    I guess what they say is true and great minds think alike

  • I can't view your CAPX but just some silly suggestions to check:

    If your sprites have a blank frame at the beginning they will be blank in the layout.

    If you accidentally changed image points they may be way off the layout screen.

    If your layout settings for that sprite are itty bitty you may not find the sprite.

    If you have a sprite covering them they can be hidden on the layout.

    If you have the layer the sprite is on set to invisible you won't see them.

    I know those are newbie probs but I still make those mistakes all the time.

    Now where is that dang sprite!

  • I still have a problem though the code is definitely better. Basically the button works only on one of the event (the rest works)

    The reason I need both is because some students will use only the keyboard and some students will use touch or mouse. I used mouse in the example but of course I could replace with touch which would also both mouse and tap.

    case 1:

    on start layout set trailOnOff = 1

    on trailONoff = 0/ set animation frame to 0

    else/ set animation frame to 1

    result: keyPress changes the button - mouse does not

    case 2:

    on start layout set trailOnOff = 1

    on trailONoff = 0/ set animation frame to 1

    else/ set animation frame to 0

    result: keyPress does not change the button - mouse does

    I will take a look at it but my suggestion for education uses is to have the user select mouse or touch before starting play to eliminate that problem and you will have just one trigger variable to tell the events to use either mouse or touch.

    I do that in my games to avoid confusion and getting clicks and taps at the same time.

  • The Scirra arcade download still not working so you can get the capx here:

    https://www.dropbox.com/s/3nkc2cifhbjj9vu/Peripheral.capx?dl=0

  • Ease up guys!

    99 offered you a good way of using array to handle a large inventory and you can't expect it to fit all uses or be used without tweaking to suit your needs.

    And 99 should know his CAPX solutions are not always going to fix a problem and people need to be walked through what a CAPX does or have it designed more specifically for a certain use or it just confuses them.

    If you can't use it there are CAPX inventory examples in the tutorials to look at.

  • Lamar, my setting to create the ragdoll is basically the same as your, but when a bullet object with 1200 of speed hit the character, all the parts came apart like a distance joint.

    LOL- Well that would do it I guess.

    If the joints are too far apart they won't make it back together.

    So you could simulate the collision using a milder impulse to your ragdoll instead of the actual impact and that should keep the parts together.

    OR you could make all the ragdoll pieces stay within a certain radius using x and y positions so they rehinge after impact.

    OR you could slow the bullet down before impact using the X and y of the bullet and ragdoll.

    You could also play with the density settings of both bullet and ragdoll to reduce impact effects.

    I would give those a try.