Item Script help

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: Item Script help
Apprentice
Member # 4531
Profile #0
I'm making a special item that causes a creature to appear next to the target, say a few text bubbles, and disappear. My first thought was to use place_monster, but you can't control the creature number with this command (thus no text bubbles). My current solution is to put the creature hidden in each town, and have the town script relay the creature number for that town via SDF. Then I use activate_hidden_group and relocate_character to move it to the proper place when the item is used. However, relocate_character doesn't check if the space is occupied or blocked, so the creature often appears inside a wall or on top of someone else unless I do an extensive check of all the spaces around the target. Is there a more elegant way to do this or am I stuck with what I have?
Posts: 32 | Registered: Saturday, June 12 2004 07:00
Warrior
Member # 4987
Profile Homepage #1
Well, if you want the creature to pop up next to a target that you know will be stationary (as in it doesnt move throughout the game) like in a special encounter in town, then you could create the monster, and create the text bubble on the space above the monster, instead of the monster itself.
Posts: 60 | Registered: Sunday, September 19 2004 07:00
Agent
Member # 2820
Profile #2
There are calls to check for the block status of the space, but what you are proposing is a difficult thing to implement. What would you have this monster *do*?

Don't forget that you can give this monster a default script of creating the text bubble over itself. You should also note that all placed creatures start out hostile, so you definitely want to be careful with that.

--------------------
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
Apprentice
Member # 4531
Profile #3
Well, the creature is mostly just a humorous side effect of a wand of terror/dumbfounding. The creature itself (a G.I.F.T.S. that has been harnessed as a weapon of psychological warfare) just appears and talks a bit during a brief cutscene, after which it vanishes. Being hostile shoudn't be a problem since it never actually gets to act. I'll look into putting the text in the creature script, though it waoud have to act as soon as it appeared rather than waiting a turn, so the spider wouldn't start attacking.
Posts: 32 | Registered: Saturday, June 12 2004 07:00
Off With Their Heads
Member # 4045
Profile Homepage #4
Placed creatures start out as hostile, but creatures appearing from being hidden can be anything.

If you want this creature to do something as soon as it appears rather than on the next turn, putting the text bubble in the creature's script is no good. I'd guess the best way to do this is to run that fairly elaborate check of the nearby squares.

--------------------
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
Agent
Member # 2820
Profile #5
INIT_STATE should work for the cutscene, shouldn't it?

--------------------
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
Apprentice
Member # 4531
Profile #6
Ok, I tried Init_State, and the problem is that the creature doesn't actually appear until init_state finishes, so the creature isn't visible in the cutscene. However, I managed to solve the problem by having init_state but my_number into an SDF, which the item script then uses. The cutscene now works as it should. Thanks for the help.
Posts: 32 | Registered: Saturday, June 12 2004 07:00
...b10010b...
Member # 869
Profile Homepage #7
quote:
Originally written by Eric-Ihrno:

Ok, I tried Init_State, and the problem is that the creature doesn't actually appear until init_state finishes, so the creature isn't visible in the cutscene.
You did remember to refresh the screen, right?

--------------------
The Empire Always Loses: This Time For Sure!
Posts: 9973 | Registered: Saturday, March 30 2002 08:00