Calls and variables - 1

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: Calls and variables - 1
Master
Member # 5977
Profile Homepage #0
I have this call, with the appropriate variables and such:

place_monster(userx - 1,usery - 2,16,0); The game complains about it. What exactly is wrong here? Do I have to put the userx -1 and usery - 2 between brackets?

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
...b10010b...
Member # 869
Profile Homepage #1
Yes.

You know, you could have checked that for yourself before posting here.

[ Friday, February 24, 2006 04:25: Message edited by: Thuryl ]

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00
Master
Member # 5977
Profile Homepage #2
I could, if I would knew where to look.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
The Establishment
Member # 6
Profile #3
You mean parenthases. I don't understand by not knowing where to look. It seems simple, modify the code in ways you think should work, load up the scenario, activate the state in question, and see if it errors. You can even use the print_num() call to help with debugging. If you cannot figure anything out, then come to the boards.

--------------------
Your flower power is no match for my glower power!
Posts: 3726 | Registered: Tuesday, September 18 2001 07:00
Master
Member # 5977
Profile Homepage #4
You're right Stareye. that's what I should have done.

Could anybody show an example of how to do it? I'm now completely confused between the terms parenthesis and bracket, so an example would indeed be useful.

Thanks in advance.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Triad Mage
Member # 7
Profile Homepage #5
Parenthesis: (
Bracket: [
Curly brace: {

--------------------
"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
Master
Member # 5977
Profile Homepage #6
Ah. Then my definiton of a bracket was wrong.

Thanks.

EDIT:

Okay, this code doesn't do what I want it to do. I have absolutely no clue as to what may be the problem. The onlt thing I know, is there isn't a "Boom_on_char" and no "set_attitude(3)."

n = 90;

char_ok(n);

place_monster((userx - 1),(usery - 2),16,0);
put_boom_on_char(n,5,0);
set_attitude(n,3);
run_animation_sound(61);


[ Friday, February 24, 2006 07:04: Message edited by: Thralni, The flying Dutchmen ]

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Off With Their Heads
Member # 4045
Profile Homepage #7
So... you're trying to place a monser, put a teleport flash on it, and make the monster's attitude neutral, right?

The call char_ok doesn't do anything — it's a pure short, a number. You can take that out. You only need to use it if you're checking that the character is alive.

Do you know for certain that the character you're placing is going to be creature number 90? The only way that it will be is if 86-89 have already been placed, but 90 has not.

This is almost invariably easier if you use a hidden monster and activate_hidden_group.

--------------------
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
Master
Member # 5977
Profile Homepage #8
So what you say is, that if creature number 89 isn't placed in that town, then any creature that I want to be 90, will appear as 86, in that specific town, not as 90.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Off With Their Heads
Member # 4045
Profile Homepage #9
The first place_monster call will place creature number 86 if therer are no other summoned monsters in the town, yes.

--------------------
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
Master
Member # 5977
Profile Homepage #10
Than that was probably the problem. thanks.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Shaper
Member # 3442
Profile Homepage #11
quote:
Originally written by Kelandon:

This is almost invariably easier if you use a hidden monster and activate_hidden_group.
Listen to Kel. Listen to him...

Lis-ten...

Really, this way is way easier, and you can still have the clever-looking flash before the creature appears.

--------------------
And when you want to Live
How do you start?
Where do you go?
Who do you need to know?


*Name by Slarty, so blame him if it's filthy...
Posts: 2864 | Registered: Monday, September 8 2003 07:00
Master
Member # 5977
Profile Homepage #12
No, sorry. I got it to work precisely as I want to work. The problem was with the definiton of the creature numbers, but it works now. I didn't know the numbers start at 86, and you can't just choose a random number.

The groups are all nice and such, but no. I may be way easier, but it will cost me another two hours to get it all working. I'll have to start replacing creatures and such, until all creatures have the right number, in each town. I have 42 towns. Can you imagine the work? You see, this creatures are summoned by a sort of wand, a special item, which calls a state in the scenario script.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Triad Mage
Member # 7
Profile Homepage #13
What if someone summons monsters with a spell? Doesn't that affect the character numbers?

--------------------
"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
Master
Member # 5977
Profile Homepage #14
Oh no, oh my god... I forgot about that... I will have to start changing it all again, I fear. *bangs his head aginst the wall*

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Master
Member # 5977
Profile Homepage #15
So... Fixed that last problem with summoned mosters. It wasn't such a drama anyway. I just let the game check if a certain mosters exists.

However, what I didn't know: How many mosters are permitted in a town?

(I'm so glad I don't have to start changing all towns by adding the with the item summoned monsters :) )

EDIT: Oh sorry, realized to late that this is a double post.

[ Friday, February 24, 2006 10:54: Message edited by: Thralni, The flying Dutchmen ]

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Off With Their Heads
Member # 4045
Profile Homepage #16
I refer you to the docs, section 2.8, under the heading How Characters Are Identified. Specifically,

quote:
Each town can have at most 120 creatures active in it at any one time. They are referred to by numbers 0 to 119. Different ranges of numbers are used for different sorts of creatures:

0-3: The party. The player’s characters have numbers 0 to 3.
4,5: Added characters. You can use calls to have a character travel with the party. That character will be put in one of these two slots. You can only add two characters.
6-85: Placed town characters. You can place up to 80 characters in a town. When you select a character in a town, you will see the character’s number to the lower left. That is the number the character will have in the game. Those preset characters are the only characters that can ever be in these slots. If you place an ogre in slot 43, slot 43 will only ever contain that ogre.
86-119: Added creatures. These slots are for wandering monsters, summoned creatures, and creatures that split.



--------------------
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
Master
Member # 5977
Profile Homepage #17
Ugh. I really neeed to learn to do it in the right order:

Try looking it up yourself
not found => boards

Instead of the other way around.

Anyway, thanks Kelandon.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Shock Trooper
Member # 932
Profile #18
@Thralni (Or anyone else interested in another way of achieving the same thing):

If for some reason you absolutely do not want to use hidden groups, you could always use this instead:

place_monster((userx - 1),(usery - 2),16,0);
n = char_on_spot(userx - 1,usery - 2);
put_boom_on_char(n,5,0);
set_attitude(n,3);
run_animation_sound(61);
Ideally, you would check to make sure that "userx - 1,usery - 2" is empty first. I'll leave that as an exercise for other people to play with. 'Cause I couldn't be bothered right now.

--------------------
Microsoft Patents Ones, Zeroes (March 25, 1998)
"Asians are good at Starcraft because they're always squinting, thus they can see things sharply. Remember to always squint in war." ~ Sun-Tzu
Posts: 215 | Registered: Sunday, April 7 2002 08:00
Master
Member # 5977
Profile Homepage #19
That is exactly the thing I made abouty a week ago, with automatical checks for amount of monsters, and possible terrain/monsters that may obscure the spot to summon the monster.

Thanks for the advice, but I already made something that works perfectly, and is almost the same as you made.

No, I'm not a complete beginner at scripting :P

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Off With Their Heads
Member # 4045
Profile Homepage #20
EDIT: Eh, never mind.

[ Wednesday, March 01, 2006 06:26: 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