Page 1 of 1

Features for multis and addons

Posted: Sat Jul 31, 2021 10:39 pm
by dragon slayer
Looking at camps to spawn but at this moment we do not have any js functions or scriptable to do so.

Like to see a new js function

onSpawnMulti this function would trigger if spawner was placed as a multi example

onSpawnMulti( iused, npc, pc )
{
       we can then spawn items and npcs inside this function.
}
onSpawnItem(iused ,pc)
{
we can only spawn items with this function
}
onSpawnNPC(npc,pc)
{
we can only use this to spawn npcs
}
onSpawnContainer(iused,pc)
{
we can use this to do something with spawn containers only
}
this all would add more functions to build on

We also need to look at expanding spawners to beable to spawn house addons and multis.

Re: Features for multis and addons

Posted: Fri Aug 13, 2021 12:13 pm
by Xuri
Great suggestion, this is needed. The implementation might piggyback on the existing CreateDFNItem/CreateBlankItem functions, but with support for a new parameter specific to multis.

Likewise for doing something when a multi is created, we can extend the onCreateDFN function to support multis as a new parameter if it doesn't support it already. Attach a script to the multi's definition in dfndata/house/house.dfn with the event in it, and it should trigger when the house is created (whether that is done by a player placing it or a script creating it).

Added a task in the UOX3 Trello board to keep track of this:
https://trello.com/c/PLmGkxxs/189-imple ... -js-engine