dop2000's Forum Posts

  • Add Browser object to the project. Add this event:

    Browser Log "Left " & ViewportLeft("HUD") & " Right " & ViewportRight("HUD") & ... and so on, as many values and variables as you need.

    Run the game, press F12, open Console tab and check the output.

    You might also want to run your project in Debug Mode, so you could pause at any time, check variables, objects etc.

    Browser-Log and Debug Mode are two main troubleshooting methods.

  • I'm guessing your variables LastTouchX and LastTouchY are inside of the viewport, that's why "SetTimeText" function is never called.

    You can add debug output to event 157 - Browser Log ViewportBottom/Top/Left/Right and LastTouchX/LastTouchY. Run the project, open console and check the values.

  • You can use custom obstacles instead of "solids". You will have to place invisible sprites on empty spaces. Then add "X" and "O" sprites as custom obstacles for pathfinding.

    I prefer to create an invisible tilemap and use it as an obstacle map. Set tiles on this tilemap where you need obstacles. See this demo:

    dropbox.com/s/isnc7nm26ekdv8q/PathfindingFTL.capx

  • Is this a Construct 2 project? These plugins are probably not compatible with C3, and because Cocoon service is no longer working, nobody will bother porting them for C3.

    You can send me the project, I'll remove the plugin and send it back to you. You'll have to add another plugin for ads. My contact email is here.

  • relixes c3p is actually a zip file. You can rename it to zip, unpack into an empty folder and search for the plugin name in project files. For example, if you search for "MoveTo", and it's found in Character.json and Enemy.json, you will know which two objects are using this behavior.

    It's the same in C2, only easier, because all objects are listed in one .caproj file.

  • is it possible to have multiple return values, also to name those as well?

    mOOnpunk Say, you have a function that returns player health, player speed and player name. So how are you supposed to call this function in an expression?

    If you need a function to "return" multiple values, you can do this by writing them to global variables, or to an array/dictionary, or put all values into a single string (comma-separated for example).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can add all objects to a family and use Family.ObjectTypeName expression.

    There is also "System Pick last created" event which may be handy.

  • Great feature, can't wait to use it!

    Ashley, could you make it so that function parameters are displayed with their default values? For example, display "number playerScore=0", instead of just "number playerScore".

    Also, do I understand correctly that the default value for each parameter will be automatically suggested when you are adding an action or expression to call this function?

    Will it be possible to omit parameters when calling a function, if you want to use their default values? Or maybe hide parameters with default values on the event sheet. This will make function calls shorter and easier to read.

  • dhoeke No, it's a valid usage scenario. He's trying to make a destructible terrain, see this post:

    construct.net/en/forum/construct-2/how-do-i-18/simple-scorched-earth-worms-ga-129595

  • It's a name of the loop index variable. In case you have multiple nested loops you can access each loopindex using loopindex("name"). For example:

    For "a" from 1 to 5
    ..For "b" from 1 to 10
    ....Create object at x=(loopindex("b")*60), y=(loopindex("a")*40)
    
  • You can do this in a loop, for example to set layers from 5 to 10 invisible:

    For "n" from 5 to 10 : Set layer looopindex invisible

  • Did you see my example? There are only a few events and you can probably modify it to your needs.

  • When you change Bullet speed to 0, bullet angle of motion is also reset to 0. So when you you set speed back to 500, the sprite moves at angle 0, which is to the right.

    You need to set angle of motion to 90 degrees in event 2.