feat: add initial People Playground mod development kit

This commit is contained in:
2026-01-06 06:35:51 +03:00
parent b89c805060
commit 566791ce62
1095 changed files with 40280 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
URL: https://wiki.studiominus.nl/snippets/spawnParticle.html
Title: People Playground Modding - Spawn particles on activation
==================================================
Spawn particles on activation
This code snippet shows how to spawn the built-in particle effects when the object is activated.
ModAPI.Register(new Modification()
{
//set item details
OriginalItem = ModAPI.FindSpawnable("Knife"),
NameOverride = "Epic knife that sparks when you use it",
DescriptionOverride = "not a single soul knows why this exists",
ThumbnailOverride = ModAPI.LoadSprite("sparkknife_view.png"),
AfterSpawn = (Instance) =>
{
//add a UseEventTrigger and set its action
Instance.AddComponent<UseEventTrigger>().Action = () => {
//spawn an effect by the name of "Spark" at the transform position
ModAPI.CreateParticleEffect("Spark", Instance.transform.position);
};
}
});