Katori's Recent Forum Activity

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Katori's avatar

Katori

Member since 7 Jun, 2009

None one is following Katori yet!

Trophy Case

  • 15-Year Club
  • Email Verified

Progress

16/44
How to earn trophies