piranha305's Forum Posts

  • What if you don't make it a function that returns a value, but inside the function set a variable with output, that you can optionally use later if u want? Would that generate your desired result? It requires an extra variable but seems to behave how you want?

  • created issue about this here: https://github.com/Scirra/Construct-3-bugs/issues/3675

  • Example of what i mean

    drive.google.com/open

    drive.google.com/open

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • no not from a file from inside an event block, you can have inline javascript code inside events, internally c3 in wrapping those in a function.

  • So i am running into a issue with the syntax checker. the error message it's giving me is 'return outside of function'. which is a bit of untrue. all inline block of javascript are wrapped inside functions, in ScriptInEvents.js file, they are all wrapped in async functions.

    why are we not allowed to break out of the code block? it seems a bit unnecessary to wrap my logic in another function. I would also like to avoid as much nesting as a can.

    is this intended behavior? or should i file this as a bug?

    Tagged:

  • Would it be possible to add an interface for the JSON plugin. having the Json data exposed in js would be very useful. also being able to set JSON back into the plugin would be great as well. This will really help managing data structure across JS and Events. It would also help avoid having to create a bunch of wrapper functions just to move data around.

    Tagged:

  • Open Game Art might have a few farm game assets https://opengameart.org/art-search?keys=farm&page=1

  • Oh nice, yeah I just picked any element fb-root was just there. Thanks for the detailed explanation 👍. It's really helpful

  • Has anyone worked with the HTMl Drag and drop API inside of construct?

    https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/File_drag_and_drop

    It seems like preventing the default behavior of the drop is not working correctly.

    here is a small test project i was using? to just get the drop handler to fire, but it would never hit the debugger statement.

    https://drive.google.com/open?id=1nXfMhuqY_Pb89yvY4jFqJh51kwoJU5r7

    Tagged:

  • Chrome also uses seperate processes for each tab, so if you have chrome open with a ton of tabs and or extensions then your chrome process will be using more resources... I have see no difference between the two and I have a pretty crappy computer.

    • Post link icon

    yep makes sense, thanks

    • Post link icon

    Ashley The remote preview is great, but having a way to open chrome dev-tools would be nice, the default f12 does not seem to work?

  • Ashley I agree with you, you can get kinda close parity with enum behavior by having an empty plugin like sprite and adding instance variable, not really sure how constant instance variables would work unless the object in question is a singleton. (if you have multiple instances, you would have to pick one to get its corresponding value). another thing that is also concerning most of the existing plugin come with extra functionality which might not be needed. if the work around is the preferred choice, it should be its own object type (not associated with sprite, which has has rendering/world properties etc), that should also allow for modifications if you wanted to expand upon it in the future. kinda of like the journey of the function plugin, it was a separate plugin for a long time until it became a first class citizen of then engine.

  • That depends you can have a constant value that means none, normally -1 or just convert it to default value and log a warning? all those little things have to fleshed out? also what would something like this really buy you? the same effect can kinda be accomplished with an empty object type and instance variables?

    it would be nice to be able to reference the enum as the integer value but also the name, and there should probably be a set of ACES around handling such a structure? another question is can this data be modified at runtime? or is it just a static list of values?

    there is also another idea for this since they are pretty similar (just where) maybe they could be merged construct3.ideas.aha.io/ideas/C3-I-207

  • while i think ENUM data types would be a great addition to construct, they need to be added holistically to the engine not just as function params,

    i agree with dop2000 not being able to use an expression in this case would really limit you, but with that said there might be a middle ground?

    enums are really just integers, lets say you were able to define them like you do a variable (global) you could have a new data type for function param called enum (which will really just take any enum type or expression) so instead of typing out a string you could do MyEnum.Choice, and the actual value of this would be the the assigned integer of Choice in the enum. this should still give you scoped intellisense but also allow for expressions based on the enum, and they could be useful outside of function params as well.