MarkeGamer's Forum Posts

  • system > for

    Name = "i"

    Start= 0

    End = Array.Width - 1 (width = size on X-as)

    i = in the expresision loopcounter("i")

    element = Array.at(loopcounter("i"))

    OR

    Array > condtion 'For each element X'

    element = Array.CurX used as an expression

    or use the condition 'Compare current value'

    to know 'i' is not needed

    Thanksssss so much

  • for ""=0 to array.width...>array.set at((loopindex),loopindex)

    OMG!!!!! Thankssss bro it worked like a magic

  • Hi everyone i want to know what is the alternative of this code in construct 2

    [quote:vg0drxvg]

    For(i=0;i<array.length;i++) {

    array=1;

    }

  • Hi everyone my issue is about storing unlocked levels in Localstorage ....i have followed this video

    8. How To Make A Game (Level Select) Construct 2 Tutorial

    Subscribe to Construct videos now

    to create select levels system and everything is okey except the storing level option .

  • MarkeGamer Try this and see. Now please work it out yourself not hard

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

    Many thanks for you i will work it by myself =)

  • You asked the same question before here with normal physics, which you marked as solved after someone posted an example:

    You then asked a question similar to your op here, and got an example:

    You even already asked this in the chipmunk forum, where I responded with a general suggestion, since you weren't specific about what what was wrong other than it doesn't work.

    So in general you're just looking for a completed working example I guess. Applying forces are one of the simplest things to do with physics, and is about the same in chipmunk. The swipe direction I guess could be trickier, but it's just a matter of checking where you first touched to where you're currently touching.

    How do you know where you're currently touching? There's the Touch.x, touch.y expressions.

    How do you know where you first touched? Save the touch location to variables under a "on touch" condition.

    How do you compare the two directions to find a direction? Something simple like a "system compare" with the current touch position and where you first touched.

    I won't make a capx, but you can do events like this:

    global number firstTouchX=0

    on touch:

    --- set firstTouchX to touch.x

    is touching

    touch.x < firstTouchX

    --- apply force (-100,0)

    is touching

    touch.x > firstTouchX

    --- apply force (100,0)

    Sorry for disturbing you in fact i was looking for a complete example or even a key which allow me to resolve my issue your suggestion seems to be logic i will try it and if i handle my problem i will share the capx thanks

  • MarkeGamer so sorry I will try again

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

    many more as you are newbie in construct 2

    https://www.dropbox.com/sh/eioscti86bpr ... 7YPza?dl=0

    Thanks ..That's exactly what i want as a concept however, is there any way to replace the bullet behavior with chipmunk physics and using the force to change the direction via touch event instead of changing the direction of box which follow the position of touch.x and touch.y

  • MarkeGamer See Falling demo again and let me know is that what you want?

    https://www.dropbox.com/s/8d2a8zt685mf8 ... .capx?dl=0

    many more as you are newbie in construct 2

    https://www.dropbox.com/sh/eioscti86bpr ... 7YPza?dl=0

    Thanks Lordshiva1948 but i guess you put the wrong file coz it's talking about uploading files from computer i see no falling box there

  • MarkeGamer you will find demo here and many more as you are newbie in construct 2

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

    Firstable thanks for your reply in fact it's almost what i need except one thing i want the green box, falling down to the bottom even when i change his direction as you did in your code

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • MarkeGamer you could do it like

    is in touch Box Set angle towards (touch.x)

    (Touch.y)

    please can you tell me how with an example coz im a newbie in construct 2

  • Hello MarkeGamer,

    I've never used the touch but, basicaly I think just check the direction of the touch (with somethin like touch start and touch end, I don't know) and apply an impulse with Chipmunk physics at that direction or an angle (switch to polar when setting the impulse).

    Thanks for reply can you please give me a sample example if you want im newbies in construct 2

  • Please someone help me, I have a falling box with physics behavior i want to change his direction when i swipe, the box will move to right or to left and continue to fall as the image below

    Im using chipmunk plugin

  • You might get a better response if you post in the actual thread for the behaviour scirra.com/forum/behavior-chipmunk-physics_t110815 HERE. Not everyone uses plugins, so it's sometimes best to target the original plugin thread.

    You also might get a better, more helpful response if you post your .capx. That way, any helpful user will be able to test for themselves and hopefully find the solution to your problem.

    One last thing, you're not adding and deleting posts just to create a bump are you? If so, please don't.

    im sorry about that i just want a response on my issue but i think i was wrong ...i will not repeat that again and thanks for your useful advices

  • help please =/

  • >

    > > Maybe you could find this link usefull? https tutorials 1049 simple-swipe-on-object (add :// and / where needed, i can't post full links since i don't havve 500 rep)

    > >

    >

    > Thanks for your reply in fact i used the same code but i have a problem about moving the box to right or left

    >

    Ohh... ok. Unfortunately i have very limited experience with construct 2 and haven't tried anything mobile/swiping yet so i don't think i'll be able to help you further more than you can yourself (by google-ing, exactly what i do too xD).

    anyway thanks for your reply i hope if i find the solution