Translations:Modding:Simple Particles/5/en

From Vintage Story Wiki
Revision as of 06:49, 19 September 2022 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Now we have the property, the only thing left to do is to set the position and spawn the particles into the world. I'm gonna use the OnHeldInteractStart and *Step method inside a custom made Item class (you can read more about this in the Collectibles Tutorial): <syntaxhighlight lang="c#">

       public override void OnHeldInteractStart(ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, ref EnumHandHandling handHandling)
       {
           handHandling = EnumHandHandling.Handled;
       }