Katori's Forum Posts

  • No it doesn't always = year - 1 because when the function is finished year.old = year.

    Here's the CAP--copyright me--produced for the LD48 competition.

    By the way, the code is all basically the last 24 hours, that's why it's messy. I know that. I just want to know why it doesn't work.

    To see the problem, press "Nuke 'em", then press "Space" to pass turns. When "Year" goes up, the red wave of radiation is supposed to move down and a random population operation is supposed to happen. They don't.

    UPDATE: I might have fixed the problem. I deleted the other qualifying arguments. Why is this happening?

    UPDATE2: I think it's fixed. I'll post the CAP again if I need more help.

  • I have it set up currently so that every time MonthInYear = 13, (the game is turn-based with each month being a turn), it sets Year.old to Year, adds one to Year, then sets MonthInYear to one. Later I have it set so that if Year.old is different then year, it will do something. This is vital to my game. The problem is, this process only works once. I had it working earlier, but I threw a bunch of new code at it and now it doesn't work. I recreated the function twice. The months still count up properly and cycle back to 1, and the years even cycle correctly, but the functions that I have set up to do every year don't run.

    What would be a better way to do this?

  • Personally I like hash tables better than INIs--INIs have very strict formatting rules, whereas hash tables are just tables.

    EDIT: This makes no sense, what I wrote. I just believe hash tables are simpler. I'd use a hash table for dialogue--but I'd use an INI for settings or maybe even saved games.

  • Thank you SOOO MUCH! It works great now. I do need people to test it though. And of course offer new feature suggestions!

    I'm uploading version 0.1.0, check the first post.

  • I just took a look at it. The base is there but in order to really make it as good as it could be here a are few sugestions.

    1. Use the common Dialog for saving and loading its pretty easy to use if you need help ask around.

    2. make the Save button an add Key button having both a save and save file is confusing.

    3. Why is the name of the key shown but not the value?

    4. In the about, the web address is scirra.com not .net

    Good for a first release and these changes will help a lot. What are you planning on using this for or is it just a little learning thing?

    Ahh, thanks for the tip about the CommonDialog! I didn't know that existed, I've got it working well now.

    I'm making this both as a learning exercise and for use in creating hash tables for future games of mine, as I find them to have practical applications.

    I'll release a new version later or tomorrow, as I intend to get opening working, but so far I've changed "Save" to "Save Key" and made "Save File" use the CommonDialog plugin. I also fixed the address of the site.

    I don't understand what you mean about the name of the key but not the value. The values are shown when you click on the keys. To me it would be impractical to show both at the same time.

    I probably need some help with the "Open File" operation I'm adding. I can get the hash table to load it in, I just can't figure out how to display all the keys correctly in the List. Any tips?

    Thanks for the suggestions!

  • Right now it's really more like "Hash Table Creator", since you can't load files. It's kinda hacky, too. If anyone wants to play with it you're welcome to, in fact I'd like it--I'm releasing it under CC-BY-SA. I'd like to work on it more, but I'm kinda stuck with the file loading part. Everything present in it now though works, to a point. I'm just releasing it because I think it might potentially be useful.

    UPDATE: File loading works!

    I'll keep this first post updated on the latest version.

    Version: 0.1.0

    Author: Katori

    License: CC-BY-SA

    EXE and Source: http://z-machines.com/zacs_files/Hash%20Table%20Editor%20010.zip

    I welcome suggestions, crits, and suggestive crits

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. It seems this bug is already logged. Problem though...the suggested workaround doesn't work for me. If I activate Motion Blur at the layout start, then deactivate it before changing layouts, the crash still happens.

  • I use Motion Blur in my current project, but the game kept crashing when I tried to change layouts. After some troubleshooting I found out that turning off Motion Blur made the layout change work perfectly.

    Is this a known bug? Is there a fix?

  • Yeah, thanks all, those are good ideas--but I went with Hash Tables. With a little hackery, it seems to work exactly like I want.

    Thanks!

  • Hey guys,

    I'm just learning Construct and I've started a little project with some clear goals to hone my skills. Basically it's a top-down RPG, like The Legend of Zelda. I've done pretty well with event-sheet based programming so far, but I've reached sort of a dead end and I have what one might call a "stupid question."

    There's only one character in the game, the player. To convey the isolation the player feels, the PC is going to talk to himself, so I have dialogue popping up at the bottom like in old NES games. Now I'm perfectly fine with creating transitions and writing text--I've got that down. But what I want to do is have it read which line of Dialogue to write from a global variable.

    So basically, I have the thing which triggers the dialogue set the number of the dialogue into a global variable "Dialogue". For my test object, the number is "d001". Now, how can I have the text object write the contents of the "d001" global variable? My goal is to make it "modular", that is, to be able to seamlessly make it read from "d005" at another time, and "d002" at another, because it's picking up the index from the "Dialogue" variable.

    I tried "nesting" global reads, but that was probably a pretty dumb idea. "Write text global(global('Dialogue'))" was never something I thought would work

    I realize that I could use hash tables or arrays, but I ridiculously don't want to, because of the fact that I can't edit them easily. Plus I don't plan to have too many lines.

    Well I hope I explained my problem clearly enough. If not, I can clarify--I've been banging my head on the keyboard for the past half-hour trying to figure this out.

    Thanks!

    EDIT: On second thought, it might be easier to use Hash Tables. Any solution you guys can suggest to my concept is welcome. I'm going to try Hash Tables.

    EDIT2: I've decided to go with Hash Tables. It works perfectly. If someone wants to suggest an alternate solution, though, I'm all ears.