Question about place_monster call

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: Question about place_monster call
Warrior
Member # 1016
Profile #0
Is there any way to get the character number of something created with the place_monster call? It would be nice if the call returned the chracter number of the newly created creature so designers could then do something to the newly spawned creature.
Posts: 141 | Registered: Saturday, April 20 2002 07:00
Shock Trooper
Member # 455
Profile #1
For clarity: by "spawned," you mean "placed," right? (another call, spawn_creature, activates a creature with a specified character number at a specified spawning point).

There's always char_on_spot: you could call that after the place call and identify the placed creature. Seems unduly clunky, though -- my kind of coding! -- so better wait for responses from beta-testers or those who actually know what they're doing.

--------------------
Forgive them, for they are young and rich and white.
Posts: 265 | Registered: Saturday, December 29 2001 08:00
Triad Mage
Member # 7
Profile Homepage #2
If you want to get that character number, the best thing to do is pre-place a character in an encounter and then set the encounter to visible when the triggering action occurs.

--------------------
"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
Warrior
Member # 1016
Profile #3
> For clarity: by "spawned," you mean "placed," right? (another call, spawn_creature, activates a
creature with a specified character number at a specified spawning point).

Yes, I meant placed. The reason I am asking is because I want to make a special ability that will create a specified monster whenever the player uses it, but I don't want it to be hostile to the party. I suppose the char_on_spot function could be used, but it would be nicer if the place_monster call would just return the character number of the monster it places.
Posts: 141 | Registered: Saturday, April 20 2002 07:00
Triad Mage
Member # 7
Profile Homepage #4
You could just create a copy of the monster that starts out friendly and create that monster instead of the hostile version (unless all placed monsters are hostile, in which case ...)

--------------------
"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
Board Administrator
Member # 1
Profile Homepage #5
There are many things I wanted to do, but I couldn't, becaused the engine was built a certain way and it would have taken a bit of work. This is number one on the list. :-(

There are ways around this.

1. Make the creature with spawn_creature.

2. Make the creature type you are making with place_monster have a default script made by you, and make that default script do what you want it to do.

--------------------
Official Board Admin
spidweb@spiderwebsoftware.com
Posts: 960 | Registered: Tuesday, September 18 2001 07:00