Jump to content

Item Script help


Eric-Ihrno

Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...