Save
Saving
  • Robert

    OK, so the compiler shows the same error that the code completion showed. But that is strange, I can not reproduce that. Does the file e:\Téléchargement\KodeStudio-Windows\resources\app\kodeExtensions\kha\Kha\Sources\kha\Assets.hx exist? What version of Kode Studio do you use?

    posted in Kode read more
  • Robert

    None of those are actual errors which prevent you from compiling and running the program - it's just the code-completion system complaining.
    Kha is also explicitly not made for coding like for flash. Quite the opposite.
    khafile.js is in the root of your project directory, you really can't miss it.

    posted in Kode read more
  • Robert

    Would still like to see that error you got.
    Have a look into khafile.js, there's a addSources line which defines where sources are looked up.

    posted in Kode read more
  • Robert

    Yes, loadSound is the thing to use once Kha recognizes your files as sounds.

    posted in Kode read more
  • Robert

    Loading an asset before using it is required. But using oggs from blobs isn't even supposed to work. Kha doesn't define which compressed audio format is supported, instead it relies on you providing wav files so it can compress it itself to whatever is needed for a given target (see https://github.com/Kha-Samples/BlocksFromHeaven/blob/master/khafile.js for how to make khamake compress down big audio files). Also StreamChannels shouldn't be created directly, kha.audio1.Audio.stream is the function to call.

    posted in Kode read more
  • Robert

    Kha is explicitly not designed for flash developers. But that aside, what errors do you get? So far you're still only showing code-completion errors (which are unreliable), not real compilation-errors (click the drop-down on the output tab to get to the other outputs). Also generally a good idea is to use a current version of Kha (see the getting started guide in the wiki).

    posted in Kode read more
  • Robert

    I recommend reading http://kha.tech/getstarted and then https://github.com/Kode/Kha/wiki - the latter also has a tutorials section but I don't know which of those are good.

    posted in Kode read more
  • Robert

    That is a veeeery old tutorial. project.hx is gone, it's all in one file now. And please don't target WPF, that's for embedding into other WPF applications, that's an advanced topic. What is ctrl+r supposed to do? Start your application with F5, that should also get rid of the kha.Assets error.

    posted in Kode read more
  • Robert

    Things change over the years, I don't know what "the tutorial" is but I guess it wasn't updated in a while. Kha's API was expanded to support more window options and rendering into multiple windows in 2018. The old code should still work but when you create a new project you get a piece of code which uses the newest APIs.
    About kha.Assets - the red squiggles should go away automatically, the code is ok.
    Yes, main is the entry point.

    posted in Kode read more
  • Robert

    All I can say like that is that I think samplerExternalOES should only be used for video textures. It's hard to help with "some Armory project". Can you break that problem down to a smallish Kha or Kinc project?

    posted in Kode read more