Bertie Booster's Recent Forum Activity

  • Would it not be easier to just apply the bullet behaviour to the object you want to scroll?

    Set bullet angle of motion to 270 & bullet speed to whatever you need and it will scroll vertically upwards..

  • You'll find the same applies in reverse ie if up button is down it stalls until you apply an is in touch action once again it's not activating the condition [1] it's deactivating the is not in touch condition in [3] which is trying to send it downwards.

    Set yourself up a splash page with the following code in it (ignore the go to options).

    <img src="http://s11.postimg.org/3puyg8e0z/control.jpg" border="0" />

    Put the desktop controls in a group called "DesktopControls" and the mobile controls in a group called.... you guessed it.

    Use the global variable ControlMethod to activate/deactivate the appropriate group of controls at the start of the game then if the user clicks a mouse or presses a key they get mouse/keyboard input, if the user touches the screen on a mob device they get touch controls and no interference between the two sets.

  • Logic is the key word here.

    look at your code.

    Is in touch OR up arrow is down.

    Then you have Is not in touch OR Up arrow is NOT down

    So to go up the following conditions must be met:

    Is in touch

    OR

    up arrow is down.

    Or so it seems but it's not that simple because the conditions continue with:

    Is NOT in touch

    OR

    up arrow is NOT down.

    which triggers a different event than that which you want and expect. ie it goes down.

    So your logic says to you that if I touch or press up arrow the player goes up but the computer says that not only do both those conditions need to be met but the conditions at [3] must NOT be met in order for it to work.

    If we look at [3] in relation to [2] then:

    If in touch in 1 then X in touch at [3] is not met but x up arrow is down IS met and now the code tells it to go UP and Down simultaneously which is why it stalls and goes to "Still" ani. Press the up button and neither condition in [3] is met so it goes up but you thought that happened because there was a problem with the touch ie the up button was activating as per condition [1] when really it's de-activating the up button clause in [3].

    Suggest you look at the tutorial on detecting input type and work from there with two sets of controls dependent upon selected input type it's easier in the long run.

  • Create a Global variable "PlatmaxSpeed"

    Use this to assign your max speed(s)in the event sheets

    To slow down System => Subtract (50) from PlatMaxSpeed

    To return System => Add (50) to PlatMaxSpeed

  • good presentation TFP!!

  • Sorry that needed new code.

    believe it or not the problem that you had can be solved in as few lines as this:

    (Set destroy to "No" on Fade behaviour)

    <img src="http://s2.postimg.org/m42oon26x/Capture6.jpg" border="0" />

  • Doh!!

    <img src="http://s27.postimg.org/5lfj7tqfn/fade.jpg" border="0" />

  • Here's how to set the "fade", you will need to add the fade behaviour to the button first.

    This example means the button will fade in over 1 second, stay 100% opaque for 2 secs then fade out and destroy over 1 second = 4 seconds total.

    So if you changed the 1 sec to 6 secs in my first example you would get 4 seconds to press the button before it disappeared then a two second pause before the next one fades in.

    (More than Simon gave you) <img src="smileys/smiley36.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry the img was resized.

    <img src="http://s29.postimg.org/8xakg0j3b/solution.jpg" border="0" />

  • Here's a solution.

    Create one button and then add an animation frame for each colour you want the button to display.

    Set ani speed to 0

    On your layout you can then manually select the frame corresponding to the colour you want to display.

    I've already made it sound more complicated than it is. <img src="smileys/smiley4.gif" border="0" align="middle" />

    Here's a pic showing the important stuff.

    I've set it to change every second, change that to 3,6 whatever you want for a slower rate of change.

    Ref your second point for effect you could add the "Fade" behaviour to the button and set it to fade out and destroy after the timeout period of your choice. More aesthetic way of presenting the game.

    <img src="http://s27.postimg.org/q6pplzimr/solution.jpg" border="0" />

  • Sorry I'm timing out a lot.

    The above post should have also read

    Fire up the debugger and watch what happens and where the resources go.

    scirra.com/blog/124/introducing-the-construct-2-debugger-and-profiler

  • Your big problem is the array "aggroArray" or rather the two instances of aggroArray that are created.

    They are both increasing in size very rapidly indeed and are running the Browser out of mem.

    Here's a pic of one, don't forget there are two instances increasing at the same rate which I guess is per tick or 60 times per second.

    <img src="http://s22.postimg.org/htzglpc69/array.jpg" border="0" />

Bertie Booster's avatar

Bertie Booster

Member since 21 Oct, 2013

None one is following Bertie Booster yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies