Teclis01's Forum Posts

  • Hi :)

    I just try to play to undertand how it works when sprite have Physics and platform behaviour.

    I check for FAQ for this but haven't found the answer (even in the topic about Physicy and Platform) :(

    So i try to make a box with a ball rolling on the side it is. Sols are controlled by the Mouse (the calculation of angle aren't good but is enough to test)

    When the ball is on the bottom horizontal bar that works but when gravity angle change gravity had a strange behaviour. The ball do not slid to the side where the bar is the more "splone" (i don t know if the word is the good one)

    I would like to share the test project but i can't write any url

  • Hi there :)

    I'm french and i just discovered construct 2 since 1 week.

    When i was young (�_o I am always young!!! ;)) , i made few ogame's like with my own engine and help a lot of projects.

    I never met an editor like construct 2 and i'm happy that someone do it.

    I do not know what would i do with but i'm going to try the more of possibilities i can.

    Indeed i'm a player since a lot of years (nearly 20)

  • Finally i find how to make that!

    Here my solution :

    Create Sprite with Timer behaviour

    Add 2 variable instance :

    begin =0

    end=0

    Keyboard : on Spacebar released

    =>Timer Set end to time

    Keybord : on Spacebar is pressed

    AND

    Timer end <= time-0.2

    =>Timer Set begin to time

    System / Every 0.1 second

    AND

    Timer <= Self+1.5

    =>Timer Set begin to 0

    =>Timer Set end to 0

    =>Player Spawn Shield

    => Timer Start Timer "Shield" for 4.0

    Timer : on Timer "Shield"

    =>Shield destroy

    The last thing is to make follow the shield :)

  • Thanks for your replies guys :)

    I think about my problem a little more, i'm going to try to explain but i'm not event fluent for now in construct :D

    So i would like to make that : By pressing fast the fire button, this will activate or help to activate the shield.

    OnKeyPressed

    if(end+0.2<=now){ // 0.2 is in seconds (0.2s maximum between 2 keyPress)

    Timer.begin; // reset of time begin

    }

    On KeyRelease

    Timer.SetEnd(now);

    Every 0.1 second

    if(begin-end>=1.5){ // 1.5 in seconds

    SpawnNewObject(Shield);

    }

    I think the algorithm is ok how can i translate thoses if statement in event?

    Few explanations :

    Timer wouls be an object with 2 members (begin and end)

    begin represents the most recent time of key pressed (with a rule of buffering if the last one was less or equal to 0.2 seconds before the next one)

    end represents the most recent time of key release

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi there =)

    I'm just newbie in construct 2 :p I just made few tutorials and i don't find any subject about my problem.

    I'm making a conversion of maniac shooter and i'm looking for tips ^_^

    How can i know if a key on keyboard is pressed during X seconds?

    The key is also used to fire and when key is kept press it activate a shield.

    When shield is active how should i do to make following or collide the 2 sprites during X seconds ?

    Thanks a lot !