dop2000's Forum Posts

  • 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
    
  • 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?

  • dropbox.com/s/0ao5967k6k59non/ThumbstickDouble.capx

    May not be very efficient code, but it works.

  • WackyToaster I'm comparing with the LiteTween - there when you execute a new "Start tween" action, a previous running tween is cancelled/stopped. Here it looks like two tweens "overlap". I really don't see how this can be used in a game, because it's very difficult to predict the result.

  • Nepeo Can I ask you a small question about Tween?

    I noticed that when you start a second tween (with the same tag) while the first tween is running, it doesn't "overwrite" the first one and the results are quite weird.. For example, if there are two actions like this:

    Sprite Tween X to 100 in 3 seconds
    Sprite Tween X to 500 in 2 seconds
    

    As a result, the sprite will move fast for about 580px in 2 seconds, and then slow down for the remaining 20px.

    Is it supposed to work like this, or is this a bug?

  • You can add an event like this:

    ToolTipText is visible
    Touch is NOT touching object -> ToolTipText set invisible (or destroy)
    
  • Your code makes no sense. Here is the correct sequence of events:

    1. You check if data in local storage exists (usually on start of first layout).

    2. If data exists, you load dictionary from local storage.

    3. If data is missing, you load some default variables from AJAX.

    4. On the end of each level you save the dictionary to local storage.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can simply multiply all scores by 100 before submitting them.

    And then when you retrieve scores from the server to show on the leaderboard, divide them by 100.

  • dop2000 Glad you liked it, I've wanted to make this plugin for quite awhile so it's nice to hear it's appreciated. The plugin technically includes a seeded random, which is used for creating the noise. We're experimenting with integrating it with the System random expressions, which would be better than duplicating them in a different plugin. It's awkward to deprecate expressions so we didn't want to expose it on the new plugin just to remove it later.

    Nepeo In C2 I'm using this plugin for seeded random. It somehow integrates with all the system random events and expressions (random, choose, pick random instance etc). It would be great to have the same functionality in C3.