Please Help Me Experienced Editors...

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

Pages

AuthorTopic: Please Help Me Experienced Editors...
BANNED
Member # 4943
Profile #25
Same response. The bubble is still on one of my guards. Is the number I insert the same as the character ID from the editor?

New Question: If I have a teleporter in a town, how do I get it to teleport the party to a different town?

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
Agent
Member # 4506
Profile Homepage #26
Okay, this is entirely theoretical. I know how to send you from one town to another, since I'm using that entirely (that's the most important code) for my new scenario ( It won't need ANY outdoor sections, it's all towns!). Anyway, here's what i imagine you'll have to do.

beginstate 12;
reset_dialog();
add_dialog_str(0,"Do you wish to enter this Portal?",0);
add_dialog_choice(0,"No");
add_dialog_choice(1,"Yes");
choice = run_dialog(1);
if (choice == 1)
end();
if (choice == 2)
set_state_continue(13);
break;

beginstate 13;
put_boom_on_char(short which_char,short which_sfx,short random_shift)
// - Places explosion which_sfx on character which_char.
//If random_shift is 0, effect appears directly on character.
//If 1, the explosion is shifted slightly in a random direction.
void run_animation()
// - Pauses the game and plays all animations you have created.
//Note that none of the above calls will draw anything on its own.
//You need to use this call to run any animations.
[B]// You would have to do that for ALL four characters, in the event that a party has four characters...[/B]
[B]// Then you would add the[/B]
move_to_new_town(short town_number,short X_location,short Y_location); [B]// call[/B]
[B]// Then, in the new town, your party would appear...[/B]
break;
Ofcourse, that's all in THEORY. The only way to test it would be to write out the code!

Tell me how it goes, or if you don't understand me!

- Archmagi Micael

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
BANNED
Member # 4943
Profile #27
Can someone PLEASE tell me what is wrong with this script? It is supposed to merely give someone a choice of whether or not to push a button, and then depending on their choice, teleport them...

beginstate 99;
reset_dialog();
if (get_flag(0,0) == 0)
add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box.","What do you do?");
add_dialog_choice(0,"Leave the button alone.");
add_dialog_choice(1,"Push the button.");
choice = run_dialog()
if (choice == 1)
set_flag(0,0,1);
teleport_party(10,38,0);
if (choice == 2)
message_dialog("You decide to play it safe.");
break;

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
BANNED
Member # 4943
Profile #28
BTW, its saying "wrong numbers/type of parameters"

oops, forgot about the edit button again

[ Monday, September 13, 2004 17:37: Message edited by: SmirfOfDoom ]

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
Apprentice
Member # 4258
Profile #29
quote:
Originally written by SmirfOfDoom:


beginstate 99;
reset_dialog();
if (get_flag(0,0) == 0)
add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box.","What do you do?");
add_dialog_choice(0,"Leave the button alone.");
add_dialog_choice(1,"Push the button.");
choice = run_dialog()
if (choice == 1)
set_flag(0,0,1);
teleport_party(10,38,0);
if (choice == 2)
message_dialog("You decide to play it safe.");
break;

First of all, you forgot a semicolon after "choice = run_dialog()". Also... you didn't use any {}'s around your if statement code, which you need to do if the statement has more than one line of code run after it. Change it to something like this:

beginstate 99;
reset_dialog();
if (get_flag(0,0) == 0)
{
add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box.","What do you do?");
add_dialog_choice(0,"Leave the button alone.");
add_dialog_choice(1,"Push the button.");
choice = run_dialog();
if (choice == 1)
{
set_flag(0,0,1);
teleport_party(10,38,0);
}
if (choice == 2) // This if statement doesn't require {}'s because it only has one line of code run.
message_dialog("You decide to play it safe.");
}
break;

Posts: 28 | Registered: Wednesday, April 14 2004 07:00
BANNED
Member # 4943
Profile #30
I've tried everything I can think of, this is what I came up with, can anyone help as to why it is still saying "wrong type/number of parameters on line 48, which appears to be the BEGINSTATE LINE
beginstate 99;
reset_dialog();
if (get_flag(0,0) == 0)
{
add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box.","What do you do?");
add_dialog_choice(0,"Leave the button alone.");
add_dialog_choice(1,"Push the button.");
choice = run_dialog(1);
}
if (choice == 1)
{
set_flag(0,0,1);
teleport_party(10,38,0);
}
if (choice == 2)
message_dialog("You decide to play it safe.");
break;

BTW, I also tried how you put it on the forum (with the "{" going the same way twice, not sure why you put it that way) and it also did not work. Any help will be appreciated on this, it is frustrating the heck out of me. This is a pretty essential part to my scenario beyond the fact that this is one of the most essential parts to a scenario, giving choices... F*(&ing Scripting...

[ Monday, September 13, 2004 19:06: Message edited by: SmirfOfDoom ]

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
Apprentice
Member # 4258
Profile #31
If it's on the beginstate line, it's likely you forgot a semicolon or a ")" or possibly a break just before it. Maybe see if there is an error in the state just before that one?
Posts: 28 | Registered: Wednesday, April 14 2004 07:00
BANNED
Member # 4943
Profile #32
For some reason the line that it tells me is wrong, never seems to be the line that actually is, so I wouldn't rely too much on it being the beginstate line. Every other script on it is PERFECT. I fine tuned them to the extreme. (beyond that I also tried to take out everything else besides what was necassary, and it still had the same result). If anyone has a portal or button or something that gives me a better example then the tutorial please let me know, I'm thinking of just forcing the players to teleport, but that would not help in future situations like this one. I really hope to get this fixed soon, I didn't do all that terrain and creature and item editing to stop at the scripting part. GRRRR.

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
Apprentice
Member # 4258
Profile #33
I tried your code out and found the error, it's in the line:
add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box.","What do you do?");

The syntax for that call is:
add_dialog_str(short which_string, char new_text, short indent);

So you should change it to something like this:
add_dialog_str(0,"In this hidden corner you find a box. Inside the box is a big red button. There is nothing else in the box. What do you do?", 0);

Also, message_dialog("You decide to play it safe."); is incorrect as well, as it takes in 2 strings. Change it to this:
message_dialog("You decide to play it safe.", "");

Also, you have your choice numbers switched, swap "choice == 1" and "choice == 2".
Posts: 28 | Registered: Wednesday, April 14 2004 07:00
BANNED
Member # 4943
Profile #34
Ok, hopefully that will solve the problem, I will try and let you know. Thank you.

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
BANNED
Member # 4943
Profile #35
While I do not fully understand why it said "numbers/type of parameters" were the thing that was wrong (unless you consider a ",0" to be a parameter) This fortunately fixed the problem. Thank you for all your help, now I wont have to be full of grrr anymore...

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
BANNED
Member # 4943
Profile #36
Well, got another problem. Go figure. This one should be simple, but I just cant see it. It tells me that "empty expression on line 46" Well heres line 45-48 (I think) tell me if you see something right off the bat, cause I looked and relooked and I can't seem to see anything wrong. (they should really explain some of these things better) sorry to be wasting your time...

add_dialog_str(0,"You find a small crevice in the wall, and it opens into a small room. Inside the first thing to capture your attention is a giant orb made of a strange crystal-like material.",0);
add_dialog_str(0,"When you look around a bit more you notice there is a Slitherazakai corpse sitting before it, as though it died staring into the orb.",0);

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
Apprentice
Member # 4258
Profile #37
I don't see anything wrong with those 2 lines (well, actually, the second line should be add_dialog_str(1, ...) instead of add_dialog_str(0, ...), but that wouldn't generate an error). Are you sure those are the correct lines? I notice you refer to them as lines 45-48 even though they're only 2 lines total. Even if the line wraps around in the text editor you're using, it'll still only be counted as one line, only actual carriage returns will count as line breaks.
Posts: 28 | Registered: Wednesday, April 14 2004 07:00
Agent
Member # 4506
Profile Homepage #38
quote:
Originally written by SmirfOfDoom:

Well, got another problem. Go figure. This one should be simple, but I just cant see it. It tells me that "empty expression on line 46" Well heres line 45-48 (I think) tell me if you see something right off the bat, cause I looked and relooked and I can't seem to see anything wrong. (they should really explain some of these things better) sorry to be wasting your time...

add_dialog_str(0,"You find a small crevice in the wall, and it opens into a small room. Inside the first thing to capture your attention is a giant orb made of a strange crystal-like material.",0);
add_dialog_str(0,"When you look around a bit more you notice there is a Slitherazakai corpse sitting before it, as though it died staring into the orb.",0);

IF THAT ISN'T YOU WHOLE CODE, I NEED TO SEE ALL OF IT, IF IT IS...THEN YOU'RE MISSING A run_dialog(); call.

- Archmagi Micael

Oh, yeah, did you try out my code...???

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
BANNED
Member # 4943
Profile #39
Of course that is not the entire code. The entirety of the code is:
beginstate 14;
reset_dialog();
add_dialog_str(0,"You find a small crevice in the wall, and it opens into a small room. Inside the first thing to capture your attention is a giant orb made of a strange crystal-like material.",0);
add_dialog_str(1,"When you look around a bit more you notice there is a Slitherazakai corpse sitting before it, as though it died staring into the orb.",1);
add_dialog_choice(0,"Leave the crystal alone.");
add_dialog_choice(1,"Try to smash the crystal.");
add_dialog_choice(2,"Stare into the orb.";
choice = run_dialog(1);
if (choice == 1)
{
message_dialog("You back away.");
}
if (choice == 2)
{
message_dialog("You pull out your weapon and beat at it a few times. Nothing happens...");
}
if (choice ==3)
message_dialog("You stare into the orb. You never stop staring into the orb.")
kill_char(0,2,0);
kill_char(1,2,0);
kill_char(2,2,0);
kill_char(3,2,0);
break;

Archmagi Micael, no I have not yet tried your line. I plan on using it when I get to that point and fine tuning it, but currently I decided to go with a much simpler version of sending people to their doom...
BTW, what is the command for a state to play it once and never again, I can't seem to find a good example, is it "end()"??

[ Tuesday, September 14, 2004 10:24: Message edited by: SmirfOfDoom ]

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
BANNED
Member # 4943
Profile #40
SSOOOOOOOOO ANGRRRYYY D&^% YOU PARENTHASIS and SEMICOLONS and COMMAS
oh well, figured the stupid problem. Thanks anyways guys, I'm guessing you probly didn't respond because of the stupidity of the mistake. F*&(ing Scripting

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
BANNED
Member # 4943
Profile #41
Alright new question...
In the editor, when you are placing a sign, how do you get it to go down 1 line? The return (enter) button does not work because it thinks that you mean done and it closes the box. Putting a bunch of spaces until it goes down also does not work, because it never goes down. So, anybody got an idea?

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
Agent
Member # 2820
Profile #42
Use a linebreak symbol |. Might I suggest that you try to break your script testing into smaller portions so you can isolate the problems more easily? Oh yeah, and the version of BoA for Windows that you probably have gives line numbers in an awkward format. Divide the number your get from the game by 2 and add 1 to get the correct line number. Of course, this only applies if your scripts are saved in Windows newline format, if they are formatted Mac style, the line numbers will be fine.

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
BANNED
Member # 4943
Profile #43
The line break works? ok. The reason I don't break them down is because I am doing a huge scenario. I do a lot of scripting at one time. Normally I can get a full few pages of scripting before running into a problem. The problem is generally not with the scripting itself, but with human errors of not paying attention to every detail, and being new to the entire avernumscript system.

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
Agent
Member # 4506
Profile Homepage #44
Smirf of Doom,

Here's a exerpt of script from the basic "Warriors Grove", which people use for a basic town (I used it myself for Magical Grove, and just edited a few texts).

beginstate 10;
if (get_flag(0,0) == 250)
end();
message_dialog("You find a narrow, concealed walkway between two buildings. Webs hang frome ceiling, and the bones of unfortunate rats crunch underfoot.","");
set_flag(0,0,250);
break;
This code shows you how to have a "once-off" encounter. However, since this is more code than the basic way of doing it, I advise only using the above way when having long strings of code that you want "Once-Off".

Here's a piece of code which I use a lot in my scenario, "Undead Valley". It's the easiest way of coding "Once-Offs", since it requires less scripting, and takes up less space. Unfortunately, this way of doing it is very patchy with other "If" commands, so use it only for short things, like message_dialog("",""); commands.

beginstate 61;
if (get_flag(6,8) < 1){ message_dialog("At last, after all of the stupid undead and Vahnatai, your end is in sight!",""); set_flag(6,8,1);}
break;
Hope that helps you. And also, I've probably been told the answer already, but anyway, How "HUGE" is your scenario going to be? (You don't have to say if you don't want to.)

- Archmagi Micael

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Warrior
Member # 4202
Profile Homepage #45
The reason the text bubble is appearing on the wrong character is (probably) because you're using the wrong number. When the creature is selected in the editor, don't look at the character ID. What you should use is where it says (for example) Creature 12: Guard. That is the number to use for the creature in scripts.

--------------------
Creator of the 3D Blades of Avernum Editor for Mac. Get it at Ingenious Isaac's Illusion, my web page. Better yet, get Battle for Wesnoth, a wonderful free TBS game.
Posts: 192 | Registered: Sunday, April 4 2004 08:00
Agent
Member # 2820
Profile #46
A character's ID is usually only used internally by the game to determine who is traveling with you, and who has died.

In every town, monsters that you place in the editor are given numbers to be referred by, ranging from 6 to somewhere around 80. A guard might have an ID of 12, a creature type of 4, but has a town number of 16.

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
BANNED
Member # 4943
Profile #47
I figured out the entire bubble crap, which was annoying, but eventually logical. My scenario is currently 7x7 outdoors. So far it seems to be about 2-4 towns per section (including dungeons and the small little villages that take 5 min). In my scenario there will be three different sects (like geneforge). And thats all you get for now.

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00
Agent
Member # 2820
Profile #48
...you should really be careful of Epic fever. I hope you will be up to be up to creating something this massive. Have you noticed how long it takes to walk across 9 outdoor sections and explore 50+ towns?

But if it works and the combat isn't just monster fudging, people will play, I suppose.

--------------------
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
====
Alorael: War and violence would end if we all had each other's babies!
====
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00
BANNED
Member # 4943
Profile #49
I do know how long it takes yes. I think Avernum 2 had about 49 outdoor sections (maybe more or less i dont know) As I said before this is not a scenario. This is a game. The problem with most "scenarios" being this large is that they have a target level. You start a character in my game, and progress from there. I already have 75% of the terrain editing done. The item editing is 90% complete. The creature editing has maybe 3 or 4 left to add. So all thats left is scripting. LOTS of typing. But yea, I think I'm up to it.

--------------------
I start this off, without any words.
I got so high, I scratched till I bled.
Love myself, better then you.
I know it's wrong, so what should I do?
Posts: 94 | Registered: Tuesday, September 7 2004 07:00

Pages