Daiz's Recent Forum Activity

  • This is pretty much the only thing that makes Construct crash for me. It usually only happens after a relatively long time, though. Since I save often, I don't usually lose much progress if at all.

  • Looks like you indeed can't get the value of a key with Python. However, a quite easy workaround exists by using the Run script action. See this cap:

    http://dl.dropbox.com/u/326175/pythonhashtable.cap

  • You mean 0.99.84 right?

    Anyway, the game runs for me, looks like I was just having some sort of weird problem earlier. Though I can't say anything about the saving yet since I didn't get so far yet.

  • Well, this is certainly weird, because I'm on Windows 7 and for example INI file can create files, but not folders. File object can create folders just fine.

    What version of Construct did you build your game in?

    Also, for the record, when I try to run your game, it just stays in black screen and nothing happens. Also, as a recommendation, please don't make the game run fullscreened on first startup.

  • Are the folder names always the same? Couldn't you just create them beforehand with the installer or something?

  • Another way to do it: After destroying an object, Unload the textures for the layout you are in. It will flush the destroyed objects from the VRAM while keeping everything else intact.

  • Now, we all know that Construct doesn't support Unicode. Thus, it's easy to think that it'd make translating your program to Japanese or Russian or to any other exotic language impossible. However, this is false: It is entirely possible. Since Construct is a non-unicode program, it, along with any exe created with it, will run in the user's system locale. Due to this, you can in fact translate your program to any language you want, like this little example application here:

    <img src="http://planar-studios.com/bin/multilanguage.png">

    Now how do we achieve this? First of all, your game obviously needs to be fitted for translation: All your text data should be loaded from external files.

    Then, if you don't feel like changing your system locale and rebooting for every exotic language, or can't get anyone else with the desired system locale to edit your files, you're going to need Microsoft's AppLocale. If you're on Windows Vista/7, you'll most likely need to install and run it in compatibility mode to XP and run it as an administrator.

    Anyway, the important thing about your external files is that they are saved in ANSI, not in Unicode. Therefore, you should open Notepad (or your favorite text editor) in the desired locale using AppLocale, and editing your files appropriately in ANSI.

    Now that you have your external files in ANSI, you just proceed to make Construct load them like business as usual. If you preview your game with the exotic languages, you'll probably notice that they show up as garbage. However, if you run Construct or the built application with the appropriate system locale (either using AppLocale or having the proper locale on your system), you'll notice that it works exactly as it should! Since chances are that your Japanese players have their system locale set to Japanese, they don't need to do anything on their end to make the game work like it should in Japanese.

    Obviously, as you noticed earlier, you can't run all languages in any system locale like you could if the application was Unicode, but that's just something you have to deal with.

    To download the above example program and its source code, click here.

  • That's what I ended up doing, but it'd be nice if we didn't have to use such roundabout ways to achieve something that should work properly in the first place.

  • One good place to start would be to make the forum search suck less. It's not really fun when you try to search for something just to get this:

    Search found 922 matches: create object python

    ignored: create object

    ()

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How did you name an object "360"? Construct should prevent you giving objects names which are numbers, or starting with numbers, because it means you can't tell object names apart from numbers in expressions.

    Well, I just made an Xbox 360 Controller object, and renamed it 360. From the looks of it, I can rename anything to any number, though. Like renaming a gradient to 303882 works.

  • I did, and renaming it fixed the problem! You, sir, are a lifesaver. Honestly.

  • So it appears that Python is broken in a project I'm working on. I enabled scripting, and upon startup, I receive the following error message:

    File "<string>", line 2037
    class 360Instance:
         ^
    SyntaxError: invalid syntax[/code:2q97tc4w]
    
    To clarify: I don't have anywhere near 2037 lines of Python in my project. Neither I have anything that would even remotely resemble class 360. I believe this is from Construct's internal Python code or something along the lines of that.
    
    Anyway, after that, whenever I try to refer to any Construct objects in Python code, it gives an error like this:
    
    [code:2q97tc4w]Traceback (most recent call last):
    File "<string>", line 30, in <module>
    NameError: name 'System' is not defined[/code:2q97tc4w]
    
    Of course, the line number and name varies. No reference at any place works. Meanwhile, in other caps, everything works just fine and dandy. Everything Python that doesn't refer to Construct objects works just fine.
    
    This is a serious showstopper for the project, since I really need Python and being unable to refer to anything means that I'm not able to do much with it. Any ideas how to fix this?
Daiz's avatar

Daiz

Member since 9 Oct, 2008

None one is following Daiz yet!

Connect with Daiz

Trophy Case

  • 16-Year Club

Progress

16/44
How to earn trophies