-
Notifications
You must be signed in to change notification settings - Fork 10
World morphs
World morphs is a Mappet cosmetic mechanism (kind of like HUD scenes) which allows to spawn/display morphs to players in the world or attached to entities. This is very useful for creating visual effects using morphs (i.e. sequencer animation, Snowstorm particles, etc.) without having to place an NPC, Blockbuster actor or even model block.
The main limitations of world morphs are that they are: temporary and client-side. The first means that they can't be placed until they get removed, i.e. they have limited lifespan. The second means that these morphs are not present on the server side, which means they can't be edited after they went sent to the client. These world morphs also disappear after players leave the server.
You can use world morphs either though following commands:
-
/mp morph add entity <target> <expiration> <rotate> <x> <y> <z> <yaw> <pitch> <morph>
, this command spawns a world morph attached to an entity -
/mp morph add world <expiration> <x> <y> <z> <yaw> <pitch> <morph>
, this command spawns a world morph in the world
For example, this command will spawn a diamond hoe above your head for 5 seconds:
/mp morph add world 100 ~ ~2.5 ~ 0 0 {Name:"item"}
Via scripts
You can use IScriptEntity.displayMorph()
or IScriptWorld.displayMorph()
to spawn a world morph:
function main(c)
{
var s = c.getSubject();
var morph = mappet.createMorph('{Name:"item"}');
s.displayMorph(morph, 100, 0, 2.5, 0);
}
This script will do the same thing as the example in the commands section.
If parts of the wiki don't make sense with Mappet's latest version, or you weren't able to recreate examples (i.e. outdated information), feel free to report the page and section that is out of date on community's Discord server (make sure to mention which Mappet’s version did you use).