dop2000's Forum Posts

  • It works for me in desktop version of C3. It won't work in browser I guess.

    Also, press F12 and check if there are any errors in Console log.

  • No, this is a good way to pick instances. You can also pick by Unique ID, IID, or some other properties.

  • Check the last couple of pages, fresh download links are always there.

  • Also, I think the problem here is that we are spoiled by Google. Their search algorithms are super advanced. With all the AI and machine learning, Google often knows what I want to find better than I do.

    It's wrong to expect the same quality results from the simple search function on this website.

  • Install this plugin:

    dropbox.com/s/g5d6kvr51g8nfpd/cocoonjsads.zip

    Then open the project, remove all references to this plugin from all events, and remove the plugin.

  • Base64 string must have a header - "data:image....."

    See this post:

    construct.net/en/forum/construct-3/how-do-i-8/load-base64-image-sprite-141995

  • You are doing something wrong. If you are not using waits in "for each" loop, then another event (on the same level) will start only after the loop has finished executing.

  • On Drag Start - create a new sprite at this position, copy animation frame from the original sprite. Then the original sprite will be dragged away, and the new sprite will stay.

  • Change in runtime? Use "Set color" effect. It will recolor the entire sprite. If you want to change color for individual pixels, you need to use Canvas plugin.

    construct.net/en/forum/extending-construct-2/addons-29/plugin-canvas-41782

  • There is in fact such plugin - Globals:

    construct.net/en/forum/extending-construct-2/addons-29/plugin-globals-120736

    It's basically just an empty object for storing instance variables. It was made as an alternative to global variables, but can also be used for making enum lists.

  • you could do MyEnum.Choice

    piranha305 Yes, that's what I thought. The dropdown list as on OPs screenshot will not work, as you can't enter expressions into it.

    So you type in "MyEnum." followed by dot into any parameter field in any dialog, and the list of values will drop down. This will be consistent with how other expressions work in C3.

    Also, what will happen if the result of the expression is an invalid number (not member of the enum list), or infinity/NaN/string etc.?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • why in the world would you want a custom input on something that is an enum?

    It's not a custom input, it's a common use case.

    If you have a function "SpawnEnemy" with enum parameter enemy_type (list values: zombie, vampire, troll), how do you spawn a random enemy?

    Or let's say there is a function "SetHealthbarColor" with enum parameter color (red, green, blue etc.) You want to call this function and set color to (Player.health<20 ? red : Player.health<50 ? yellow : green).

    If expressions are not supported for enum parameters, then you'll have to do this:

    If Player.health<20 then Call "SetHealthbarColor", color:red
    Else If Player.health<50 then Call "SetHealthbarColor", color:yellow
    Else Call "SetHealthbarColor", color:green
    

    Three lines of code instead of one!

  • You are proposing enum type for functions because it will make them more organized, easier to use and refactor, and I agree with you. But there must be an option to use expressions with enum parameters. Are you saying that if I want to call my function with parameter choose(Linear,InElastic,InSinusoidal), I will not be able to do it, and will have to use string type parameter instead? This is a serious disadvantage and limitation.

  • Ok, so lets say you have a function "RunMyTween" with enum parameter easing_function. When you call this function, in the dialog you can select the value for easing_function parameter from the list, like this, right?

    But my question still remains - if you need to use an expression instead of selecting the fixed item from the list, how do you do it?