Jump to content

Recommended Posts

Yes, it is possible. Make your item (art etc), implement in game. Then ask for help to make it better. :-)

Heres the lua for the weapon, I can make it heal people but it doesnt show the lighting fx when cast, and Id like to add a area of effect freezing attack on it.

tanto.lua

local function HealFunc(inst, target)	print(inst, target)	local caster = inst.components.inventoryitem.owner	caster = caster or target			if SanityCheck(caster) then		--target.components.health:DoDelta(25)		--AOE		local pt = target:GetPosition()		local range = 10		local must_tags = {"player"}		local players = TheSim:FindEntities(pt.x,pt.y,pt.z,range,must_tags)		--All players in range 10 near target		for _,v in ipairs(players) do 			if v.components.health and v.components.health.currenthealth > 0 then				v.components.health:DoDelta(25)			end		end	else		inst.components.talker:Say("Doge need much sanity.")	endend

  • Like 1

I was going more for that when you right click on the weapon in the equip slot that it would cast freeze in a  area, and for just right clicking a mob/player that it would heal them 25hp and play the lightning fx, so like a primary heal and a secondary aoe freeze, which I dont get how to do.

 

 

local function HealFunc(inst, target)	print(inst, target)	local caster = inst.components.inventoryitem.owner	caster = caster or target			if SanityCheck(caster) then		--target.components.health:DoDelta(25)		--AOE		local pt = target:GetPosition()		local range = 10		local must_tags = {"player"}		local players = TheSim:FindEntities(pt.x,pt.y,pt.z,range,must_tags)		--All players in range 10 near target		for _,v in ipairs(players) do 			if v.components.health and v.components.health.currenthealth > 0 then				v.components.health:DoDelta(25)			end		end	else		inst.components.talker:Say("Doge need much sanity.")	endend

 

 

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...