Don't Starve Revision History Viewer

Comparing Six Feet Under (Rev 86935) to All's Well That Maxwell (Rev 88237)

prefabs/spider_web_spit.lua

121314151617181920212223242526272829303132
local function OnHit(inst, owner, target) local pt = Vector3(inst.Transform:GetWorldPosition()) inst:Remove() -- local impactfx = SpawnPrefab("impact") -- if impactfx then -- local follower = impactfx.entity:AddFollower() -- follower:FollowSymbol(target.GUID, target.components.combat.hiteffectsymbol, 0, 0, 0 ) -- impactfx:FacePoint(Vector3(owner.Transform:GetWorldPosition())) -- end --inst.SoundEmitter:PlaySound("") --spawn hit effect ----------------------- --spawn in web creation prefab *Looks really bad right now. Revisit this later.* -- local web = SpawnPrefab("spider_web_spit_creep") -- web.Transform:SetPosition(pt.x, pt.y, pt.z) end local function fn()
121314151617
local function OnHit(inst, owner, target) local pt = Vector3(inst.Transform:GetWorldPosition()) inst:Remove() end local function fn()
47484950515253
inst.persists = false inst:AddComponent("projectile") inst.components.projectile:SetSpeed(30) inst.components.projectile:SetHoming(false) inst.components.projectile:SetHitDist(1.5) inst.components.projectile:SetOnHitFn(OnHit)
32333435363738
inst.persists = false inst:AddComponent("projectile") inst.components.projectile:SetSpeed(20) inst.components.projectile:SetHoming(false) inst.components.projectile:SetHitDist(1.5) inst.components.projectile:SetOnHitFn(OnHit)