while (char_ok(i) == 0)
Author | Topic: while (char_ok(i) == 0) |
---|---|
Warrior
Member # 2796
|
written Saturday, September 10 2005 15:28
Profile
Hi, Here is a piece of "for next" coding , Ops!, wrong language, that I do not quite understand. quote:I guess my questions are : what character's name is appended? and just how is it displayed to the player? Thanks before hand for any help. gcmaxxon :confused: -------------------- quote: Posts: 97 | Registered: Wednesday, March 19 2003 08:00 |
Triad Mage
Member # 7
|
written Saturday, September 10 2005 16:08
Profile
Homepage
The name is appended to the buffer, which holds strings that you are appending. To get each character's name, the appending name line should go inside of the curly braces. -------------------- "At times discretion should be thrown aside, and with the foolish we should play the fool." - Menander ==== Drakefyre's Demesne - Happy Happy Joy Joy Encyclopedia Ermariana - Trapped in the Closet ==== You can take my Mac when you pry my cold, dead fingers off the mouse! Posts: 9436 | Registered: Wednesday, September 19 2001 07:00 |
Off With Their Heads
Member # 4045
|
written Saturday, September 10 2005 21:58
Profile
Homepage
I'm guessing that he got that code out of one of my scenarios — the bracketing is distinctive. The idea is that the while loop finds the first living character. It starts with 0, and if 0 is dead, it checks 1, and so on until it finds the party leader. So i is the first living character, and that character's name is appended to the text buffer. That displays nothing. Notice a few lines later that there's this: Or something along those lines. The get_buffer_text saves the text buffer to dlgstr, and then message_dialog pops up dlgstr. This is the way to make a message box address the leading character by name. -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |
Warrior
Member # 2796
|
written Saturday, September 10 2005 22:41
Profile
Hi, Yes, you are correct. It is coding from "Castle Pudideum". I thought this was one (maybe the only way) way of displaying one of the party's name. Can I use your "dlgstr" coding? Thanks for the help. gcmaxxon -------------------- quote: Posts: 97 | Registered: Wednesday, March 19 2003 08:00 |
Off With Their Heads
Member # 4045
|
written Sunday, September 11 2005 05:49
Profile
Homepage
Yes, you can use it. -------------------- Arancaytar: Every time you ask people to compare TM and Kel, you endanger the poor, fluffy kittens. Smoo: Get ready to face the walls! Ephesos: In conclusion, yarr. Kelandon's Pink and Pretty Page!!: the authorized location for all things by me The Archive of all released BoE scenarios ever Posts: 7968 | Registered: Saturday, February 28 2004 08:00 |