Jump to content

Recommended Posts

You will first need to create a widget for this overlay. Then you will need to add this widget to screens/playerhud.lua in the CreateOverlays function.

Take a look at the Tropical Experience mod, they add the poison overlay into the game with this code:

Spoiler

AddClassPostConstruct("screens/playerhud",function(inst)
	local PoisonOver = require("widgets/poisonover")
	local fn =inst.CreateOverlays
	function inst:CreateOverlays(owner)
		fn(self, owner)
		self.poisonover = self.overlayroot:AddChild(PoisonOver(owner))
	end
end)

 

 

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
×
  • Create New...