dop2000's Forum Posts

  • You can use a different expression when timescale=0 with a fixed value instead of dt, for example 0.016 (which corresponds to 60 FPS).

    Or calculate your own dt from fps value:

    If timescale=1 : lerp(width,xpbarwidth*(xp/maxxp),XPBar.dt*4) 
    Else: lerp(width,xpbarwidth*(xp/maxxp),(1/max(fps,30))*4) 
    
  • You can do this:

    But I'm not an expert in JS, so this solution may not be a good one.

  • You need to post here:

    github.com/Scirra/Construct-feature-requests

  • How can I change the settings so that Construct 3 doesn’t download the NWJS version every time for each platform when i try export game?

    C3 should download each version of NWJS only once. It's then kept in browser storage.

  • Have you tried this?

    runtime.globalVars.varName = button;

  • I mean, the function creates a battlefield icon, but picks the last grid icon instead of the battlefield one, thus changing its size, position, etc.

    I doubt this is the case. If "Pick last created" condition goes immediately after "Create" action, then it should pick that created instance.

    Perhaps the function is called with an invalid objectName? In this case the Create action will not create anything, and "Pick last created" will indeed pick some previously created icon.

  • Try searching the forum for something like "idle income", there are lots of posts.

    Use Date.now expression of the Date plugin to get the system time in milliseconds:

    construct.net/en/make-games/manuals/construct-3/plugin-reference/date

    While the game is running, save the time to Local Storage every several seconds or so. When the game is launched, try to retrieve the value from Local Storage and calculate how much time has passed.

  • all it needs to do is add a variable to another variable every .1 seconds, and every 1 second

    Your game doesn't need to continue running for that. You save the time when the game was suspended. When it's resumed, you simply calculate how much time has passed and add it to the variable. Use Date object to access system time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It's difficult to guess. Check z-elevation settings on all objects. Check in Debug Mode that they are on correct layers, maybe some event moves them. Check that they don't have any blend modes or effects.

    Can you can reproduce the problem in a blank project by copying all three objects there?

  • I don't know if this is possible on Steam Deck, but if you manage to open developer console (F12), there will probably be an error message explaining the black screen.

    Perhaps if you connect an external keyboard to the Deck?

    You need to export the game with DevTools enabled.

  • You are probably using "On key pressed" conditions, which are triggered once per pressed key. You need "Is key down" conditions which continue to run continuously.

  • It's for organization only. You can also copy/paste/import/export the entire folders of animations.

  • Seems like you've got everything right - a state machine based on instance variables and timers, families, functions etc. That's how games with multiple enemies are made in Construct.

    Don't use top-level events like "Enemies state=attack : do something", this is bad practice and bad for performance.

    Use Timer behavior to change enemy states and to switch targets. Use LOS and Pathfinding behaviors to look for targets and chase them.

    There are lots of ways to pick targets. You can, for example, do something like this if you don't want all enemies to attack one target:

    Enemy On "pick_new_target" Timer
    Enemy Pick Allies in LOS
    
    .. For each Allies
    .... Enemies pick All
    .... Pick Enemies that are already targeting this Ally -> Save their count in an instance variable Allies.targetedBy
    
    .. Pick Allies instance with the lowest targetedBy value 
    

    If you are new to C3, one of the most important concepts is picking. Once you understand how instances are picked in events (and in nested events), it all starts to make sense.

  • Yes, family and hierarchy is not the same.

    Use a hierarchy if you need to combine lots of objects and move them all together.

  • You are probably not picking the right enemy instance. You need to show your code, screenshots of your game are not helpful.