dop2000's Forum Posts

  • When you swipe to scroll the images up and down, wherever frame your finger lands, that frame is selected - not ideal.

    Use "On Object Tap" event for selecting frames, not "On Object Touched"

  • It's a pretty basic feature in many games, try googling, you should find lots of examples and tutorials.

    Here is one

    howtoconstructdemos.com/simple-scoreboard-leaderboard-with-an-array

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Without the project file it's difficult to tell. One possible reason is that it's pushed out by a solid object.

    What behavior are you using for movement? You can try disabling the behavior before changing its position.

  • What you described is not a great setup, you probably understand it yourself.

    A 2D array or JSON would be much easier to work with, to edit and store data.

    With 18 instance variables there are basically only two solutions:

    1. Use a bit of Javascript to retrieve the variable value by name:

    runtime.objects.spriteName.getFirstPickedInstance().instVars["var_name"])

    2. Check all variables one by one, until you find the right one:

    Let's say you store the selected year in vTime global variable, and want to extract the result into instance varible vResult.

    For Each Sprite
     If vTime="Year_2024" : Sprite set vResult to Self.Year_2024
     Else If vTime="Year_2023" : Sprite set vResult to Self.Year_2023
     Else If vTime="Year_2022" : Sprite set vResult to Self.Year_2022
     Else If vTime="Year_2021" : Sprite set vResult to Self.Year_2021
     .....
    
    

    You can compress that into one action if you use ternary operators:

    For Each Sprite
     Sprite set vResult to (vTime="Year_2024" ? Self.Year_2024 : vTime="Year_2023" ? Self.Year_2023 : vTime="Year_2022" ? Self.Year_2022 : ......)
    

    You don't need to access the internal details of the engine to write addons that access third-party services like multiplayer and analytics, or platform features like monetization.

    Yeah, sorry, I didn't suggest that we necessarily need access to internal details. I meant it's not possible to avoid using addons completely. And even with SDK v2-compatible addons we still need someone to convert them, which may be problematic.

    Developers who mention in this thread that they are not using addons - I envy you. Unfortunately, it's not an option if you are making a commercial game.

    If you need multiplayer or online features - you HAVE to use Playfab, Photon, Firebase etc. Making mobile game - you NEED monetization addons. Working with a publisher - you NEED analytics addons.

    There is no choice or free will. Without the addons there will be no game.

  • Thanks!

    I didn't realize Browser.language was not reliable. Will use UILanguage now.

    Ashley I wonder if you've discussed this with Chadori, Mikal and other big addon makers? Will you provide them support, ensure that their addons get converted before the deadline?

    C3 really lacks monetization features (to put it lightly), especially on mobile. Mobile developers fully rely on 3rd party monetization addons. You can't just brush them off and say "you knew the risks, you had plenty of time to contact the addon developer etc."

  • Which of these is the preferred method to automatically detect language in a Steam game?

    • Browser.Language: The browser's current language setting.
    • Steam API GameLanguage: The language set specifically for the game.
    • Steam API UILanguage: The language set for the Steam UI.

    Tagged:

  • I set the two actions to -275 and it worked.

    I see -1000 on your screenshot. Assuming that this object is on a layer with no parallax, then it's -1000 pixels up from the top edge of the screen.

    If swipe2 object has origin point at the top and you want to restrict its movement by top and bottom edges of the screen, you can use this more universal formula instead of the last two events on your screenshot:

    On every tick: swipe2 set Y to clamp(self.y, ViewportHeight(self.layer)-self.Height, 0)

    A couple of other things:

    Instead of pinning category names to swipe2, add them to a hierarchy in the layout editor.

    Use a single object categoryName with multiple instances instead of 17 different objects.

    Your code is not framerate independent, use delta time. For example: move forward swipespeed*20*dt

  • It's difficult to understand what's going on with all these timers and flowcharts. My guess is that with shorter timers the enemy state changes before the timer expires.

    I suggest debugging with one enemy instance. And add console logging (Browser->Log) to key events to see when they are triggered.

  • I would probably do this with hierarchies. Assuming that all objects stored in small grid are instances of the same sprite (say, Icons), you can create a hierarchy with SmallGrid + 9 icons on an unused layout. Then you can spawn the entire hierarchy with all icons already in place. Filling it will be a matter of setting the correct animation for each icon. Maybe you can store these animations in an array or something.

    Or you can even prepare the whole thing (BigGrid + 9 SmallGrids + 9*9 icons) on the layout in advance, and hide most of them. When you need to reveal the big grid - make them all visible.

  • You skip to the next entry in the table, see my first comment.

  • There are several ways to organize this.

    For example, if all players are instances of the same sprite or family, you can store control type in an instance variable. Then, in keyboard/gamepad events pick the player instance:

    Keyboard On Space pressed
    Players controlType="kbd" : Player simulate jump
    
    Gamepad 0 on A pressed
    Players controlType="gamepad1" : Player simulate jump
    
    Gamepad 1 on A pressed
    Players compare variable controlType="gamepad2" : Player simulate jump
    

    To optimize this code you can create functions or custom actions for each movement - PlayerMoveLeft, PlayerMoveRight, PlayerJump etc. Then call these functions/custom_actions from keyboard and controller events:

    Keyboard On Space pressed
    Players controlType="kbd" : Player Jump
    
    Gamepad 0 on A pressed 
    Players controlType="gamepad1" : Player Jump
    
    Gamepad 1 on A pressed 
    Players controlType="gamepad1" : Player Jump
    
    Player Custom Action Jump 
     Player simulate jump
     Player set "jump" animation
    
    
  • If you don't need to keep another permutation table in AdvancedRandom active, then there shouldn't be any conflicts. You can re-generate permutation tables as often as you like.