dop2000's Forum Posts

  • AllanR I don't think your version is working correctly. If you touched any of the ControlsFamily squares first, you can't rotate the ship with the second touch. If you started rotating the ship, you can't move it..

    I'm guessing this is how it's supposed to work (open in Chrome):

    doptrix.com/C2/ahmtd

  • Depends on what you want this movement to look like.

    If you just need constant speed, you can do this without any behaviors:

    On every tick 
    Character X<15 : Character move N*dt pixels
    

    You can use lerp (very fast start, slows down as it gets closer to position):

    Character set X to lerp(self.x, 15, dt)

    Or try the new Tween behavior in C3 runtime, with it you can make different cool effects - acceleration, deceleration, bounce, etc.

  • dropbox.com/s/rsjjrysqt3vc9v5/InfiniteParallaxBG.capx

    See the last two events. Your background should be at least 2 times wider than window size.

  • Maybe you should lose the attitude and stop being an a-hole to people who are trying to help. You can create perfectly working multi-touch controls in C2/C3, good luck figuring this out on your own.

  • See this demo (sorting array by "HP" in column 1):

    dropbox.com/s/88wse8qyrr3ysgs/arraySort.capx

  • Did you set animation speed to 0?? It works for me. Normal mode - light blue shadow, hard mode - dark blue.

  • Instead of ranting for 2 pages you should've clearly explained what exactly are you trying to make. It's impossible to understand what's going on in your project.

    You want to move the ship with those blue and green squares (right hand), and aim by touching anywhere on the screen (left hand), correct? Why don't you use a "virtual joystick" or thumbstick? There are plenty of examples on this forum, I made one just yesterday:

    construct.net/en/forum/construct-2/how-do-i-18/how-do-i-multi-control-for-and-139160

  • Should be easy enough.

    For "y" from 0 to array.height-1
     if array.At(X, loopindex("y"))="" 
     ---> Array set value at (X, loopindex("y")) to new_value
     ---> system Stop loop
    
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That's actually what multidimensional arrays are for. Set array Height=3 and you will be able to store three values per each X element. (on Y axis)

    For example:

    WeaponsArray set value at (X=0, Y=0) to damage
    WeaponsArray set value at (X=0, Y=1) to ammo
    WeaponsArray set value at (X=0, Y=2) to maximum_ammo
    
    To get ammo of weapon 0: WeaponsArray.At(0,1)
    

    If you have 2D array, use Depth=3 and store values at axis Z.

    If you are already using 3D array, then you can store multiple values in comma-separated strings, as mOOnpunk recommended.

  • What exactly doesn't work? You might need to add a deadzone. See this example:

    dropbox.com/s/fpfpwv7io4v6rf1/GamepadTopViewShooter.capx

  • I don't understand, what shadow? PlayerGhost sprite? Maybe that's because you didn't stop its animation (set animation speed to 0).

  • In event #2 you reset all global variables to default (including "Hardmode" variable). After that in event #25 you check if Hardmode is false, which it is now.. There are many ways to fix this, the easiest is set Hardmode=true again in event #2.

  • Note, that I'm not using the third variable - "pistolAmmoLeft".

  • Don't use Text Box and other Form Control objects in your games, unless you absolutely need to. They are DOM elements, and have lots of issues - it's hard to style them, they are displayed above all layers, they have problems with positioning, they may be displayed differently in different browsers, they may "steal" focus and keyboard events will not work etc.

    In your case I suggest using a simple text, or a sprite font, or maybe even a static sprite with a few frames if you don't have many tooltips in your game.

    If you want your text to remain readable when shown on different backgrounds - use Sprite Font with an outline or its own background. Here is a very useful tool:

    construct.net/en/forum/game-development/tools-and-resources-27/sprite-font-generator-v3-64038

  • Yes, an event with two condition. The first condition doesn't really matter, it was just an example. You can use some other way to check if the tip text is on the screen, or even remove this condition completely.

    By the way, are you saying are you using Text Box object just to display text? Why not use Text object?