Main Connecting Starting



Building: Auto Objects

Autoobjects

There are some situations where you want copies of an object to start somewhere by default.

For example, officers on the station all need to be wearing uniforms etc. Rather than either manually creating or copying objects for this, you can use the "auto" array.

PropertyFunction
auto.nThe ID of the object to clone
auto.n.countThe number of clones auto auto.n to make
auto.n.wornIf set to 1, make the owner of this object wear it (if possible)
auto.n.wieldIf set to 1, make the owner of this object wield it
auto.n.holdIf set to 1, make the owner of this object hold it
auto.n.mountIf set to 1, make the owner of this object mount it
auto.n.invisSet to 1 or 0, controls the state of the Invisible flag on the clone(s)
auto.n.stateSets the initial state of the clone(s)
auto.n.seatforIf set to the ID of a mobile with the same owner, makes them sit on it
auto.n.bedforIf set to the ID of a mobile with the same owner, makes them sleep on it

The sitting/sleeping status set by seatfor/bedfor on a mobile is only set as a temporary flag, so make sure you use unreset or setflag to make the change permanent, or dynreset will think that the mobile has been tampered with and needs resetting.

For beds, seats, clothing and weapons, though you can use them in combination with auto.n.count, you shouldn't. Only the last clone will actually 'win' and become the weapon or seat or whatever. If you want one item to be used by a mobile and the rest to be lying around, consider using multiple auto.n entries instead.

As with any array, you can use auto.1, auto.2 etc, and you must set the number of elements with auto.count.

There is a handy "addauto <object-id>" command that will add a new auto object to the room, taking care of all the details for you!