Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

[CNC] Dynamic Array 2 or Code Ideas...


USC

Recommended Posts

Hey.

So, I'd like some help with one of two things. I'm working on something, and I'd really like to use the Dynamic Array extension. However, Clickteam Extensions only has the MMF version; they offer a separate download for CNC/TGF, but that one's dead. 3EE, the creators of the extension, no longer host Clickteam extensions on their site.

If anyone has a copy of it that they'd like to send me, I'd greatly appreciate it.

----------------------------------------------------------------------

Or, if anyone would like to help me think of a better way to code this that wouldn't involve arrays, that'd be great too. :)

Alright, I have a friend who's taking a Spanish course. She's having problems with exercises that involve filling in blanks in sentences with the right word (IE : "No quiero ______ hoy en gym, porque no tengo zapatos corrientes", except more difficult...and correct grammar and such). So, I'm making a program to give her practice.

The basic premise is that you're talking to someone (RPG textbox style), but most of the time you won't hear parts of what they're saying. So, you have to type what's missing, and then answer the question based on that.

I plan to use INI files to store all the text, along with what direction to talking picture should be (with each direction having a different animation, like happy, sad, etc). Por ejemplo...

[Megan - Early Morning]
1 = Hola, Nick. ¿Cómo estás?               //Typical greeting
2 = 8                                              //Direction for happy animation
3 = Sí, yo también. Necesito café...     //If you respond that you're tired
4 = 11                                            //Direction for tired animation

At the beginning of each level, I was going to use a Fast Loop to load all the text and directions into a 2 column array. One column for text, one for the numbers. Something like this...

Do While variable < 50
  If Flag is set off
     *Save Array(index,0) as Item "variable"
     *Flag is set on
  Else
     *Save Array(index,1) as Item "variable
     *Flag is set off
     *index = index + 1
  Endif
  *variable = variable + 1
Loop

It's simple after that; I'd just have to call a string up from there, and use String Parser or something to count spaces between words. When that reaches a certain (randomly generated) number, I'd blank that part out and save that word somewhere. Then, when you type something and submit, what you typed would be compared that saved word, and if they match you get a point or whatever.

Hope that made sense. If anyone can think of a more efficient way of doing things, that'd be cool too.

Link to comment
Share on other sites

Uh, that sounds like a pretty good method to get things done right there. I love how you used the ini so you can easily add text into the game.

As for the extension...

TGF

http://sonicsoft.supersanctuary.com/OtherFiles/garray.gox

MMFX

http://sonicsoft.supersanctuary.com/OtherFiles/garray.cox

Just happened to have it lying around on my comp. =D

Btw, I love arrays as they can hold so much info and be organized according to 3 different coordinates. Not only that, but they can have information accessed quickly with barely any loading or saving time. I would say that your method as of now doesn't seem like it really needs any different way.

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...