lordfool Posted April 15, 2015 Share Posted April 15, 2015 Is it possible to make a area of effect attack or spell? I want to make a item or weapon cast a spell that freezes every mob within a set area.Also is it possible to add a lighting fx to a heal spell when used on another player? Link to comment Share on other sites More sharing options...
Maris Posted April 15, 2015 Share Posted April 15, 2015 Yes, it is possible. Make your item (art etc), implement in game. Then ask for help to make it better. Link to comment Share on other sites More sharing options...
lordfool Posted April 15, 2015 Author Share Posted April 15, 2015 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 Link to comment Share on other sites More sharing options...
Maris Posted April 15, 2015 Share Posted April 15, 2015 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 1 Link to comment Share on other sites More sharing options...
Maris Posted April 15, 2015 Share Posted April 15, 2015 Also there are PvP servers. And your item will heal ALL players near target. It's little bit strange on PvP server. Link to comment Share on other sites More sharing options...
lordfool Posted April 16, 2015 Author Share Posted April 16, 2015 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 Link to comment Share on other sites More sharing options...
DarkXero Posted April 16, 2015 Share Posted April 16, 2015 I made a custom green staff.mystaff.zip 2 1 Link to comment Share on other sites More sharing options...
lordfool Posted April 16, 2015 Author Share Posted April 16, 2015 (edited) Just what I was looking for thanks!!I made a custom green staff. edit @DarkXero, I've been trying to make it drain 15 sanity each cast, but I cant figure it out. Edited April 17, 2015 by lordfool Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now