Full Version : I have this mobile that can accept...
xmlspawner >>Q&A >>I have this mobile that can accept...
<< Prev | Next >>
Greystar- 03-07-2006
I know XMLSpawner can set some properties when the spawner spawns a creature... I am working on a creature at the moment that can take none to several settings for example
slime( bool metal, int color, int age )
my question is can I use an XMLSpawner to do something like the following
slime/METAL/true/COLOR/1/AGE/4
or cause they are custom to my mobile that wont work... Haven't tried it yet but I'd like to know cause I want to make it so certain types of this mobile are only found in certain areas... (BTW this isn't a Slime I'm working on, it was just the first mobile that came to mind).
ArteGordon- 03-07-2006
If metal, color, and age are the names of the custom properties on your mobile, and they are public and writeable, then what you posted will work
slime/METAL/true/COLOR/1/AGE/4
If you have a constructor for your mobile that takes those additional arguments that you listed
slime( bool metal, int color, int age )
then you could also spawn it by passing those arguments to the constructor like
slime,true,1,4
The fact that they are custom props wont make any difference.
Greystar- 03-07-2006
Thanks, I think ill try using the comma's even though for readability if I where to export it to an XML for reimporting it may be easier to keep it like I have it... but thanks, I was hoping that was the case... Now I just gotta find the locations in the world where I want these things to spawn so they can go find their food (they eat specific mobiles if they can find em, otherwise they attack the nearest mobile when they get hungery) helps them get stronger so it gives the Players a bit of variety... I'm not adverse to mentioning what they are here but on RunUO I wont since it "just another evo" its an evolution dragon AD&D style (aka Metallic/Chromatic) dragons, including functions to make them attack each other if a chromatic finds a metallic, etc... they will also attack players if they "sense" the player is carrying a dragon egg...
godfood- 03-08-2006
Very Cool GreyStar