Help Calling "Specials"

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Help Calling "Specials"
Warrior
Member # 1250
Profile #0
Couple of questions, separated into calling "specials" (as the editor calls them) a.k.a. script states, in town and outdoors.

First--I'm able to call script states in town when the characters *walk through* them. I can get dialog messages to pop up, but I've had trouble making other things happen. For instance, I set up a little resting function. The party approaches a bed, gets the dialog choice to rest or not, but whatever I choose, it won't rest the party. Also, I'm still not able to set up a call when the party *looks* at an item, i.e. a chest, to give them, say, a special item.

Second, I can't even get a call to print dialog, from a field I set up outdoors.

Any advice anybody can give after my muddled explanation up there is appreciated.
Posts: 93 | Registered: Saturday, June 1 2002 07:00
Infiltrator
Member # 3040
Profile #1
You may want to post the troublesome scripts here, or it will be difficult for anyone to help. The proper call to go to another state is

set_state_continue(state);

Perhaps you're using set_state(state), which is more suited for use in terrain and creature scripts?

--------------------
5.0.1.0.0.0.0.1.0...
Posts: 508 | Registered: Thursday, May 29 2003 07:00
Off With Their Heads
Member # 4045
Profile Homepage #2
Note that run_dialog is a SHORT, not a VOID. That means it's a number. If you want to make it do something, you have to do something like this:

choice = run_dialog(1);
if (choice == 1)
end();
If you want something that responds when the party searches, use the script specobj.txt, which is included in virtually every scenario released so far.

[ Saturday, February 12, 2005 14:37: Message edited by: Kelandon ]

--------------------
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 # 1250
Profile #3
Oh, excellent! Thanks, Kelandon! This is exactly what I needed... Heh... must've overlooked it somewhere in the documentation...

Thanks again. I'll work out what all the particulars in that script are, but it looks like I have a feel for it.

EDIT: Okay, I got the special item addition to work. But I'm still fuzzy on how to get a dialog choice to work. I looked at the docs, and I'm not clear on what code to put in after the run_dialog command. I know that the choice the player makes is returned *somewhere,* but I don't know how to make different things happen depending on that choice.

[ Sunday, February 13, 2005 16:03: Message edited by: Guardian of Eternity ]
Posts: 93 | Registered: Saturday, June 1 2002 07:00