lbphero

How do i add tags to existing prefabs?

Recommended Posts

lbphero    162

I want to add a tag to all deciduous trees. How would i do that in a mod?

Share this post


Link to post
Share on other sites
Hornete    478
AddPrefabPostInit("InsertPrefabHere", function()
	inst:AddTag("thetagyouwannaadd")
end)

There's also AddComponentPostInit, AddStategraphPostInit, AddClassPostConstruct and more. you can find this in the modutil.lua

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
lbphero    162
38 minutes ago, Omaremad74 said:

helpful stuff

Had no idea about modutil! thanks a lot!

  • Like 1
  • Haha 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now