pizdauskas Posted June 4, 2015 Share Posted June 4, 2015 data/scripts/prefabs/dragonfly.lualocal function TransformNormal(inst) inst.AnimState:SetBuild("dragonfly_build") inst.enraged = false --Set normal stats inst.components.locomotor.walkspeed = TUNING.DRAGONFLY_SPEED inst.components.combat:SetDefaultDamage(TUNING.DRAGONFLY_DAMAGE) inst.components.combat:SetAttackPeriod(TUNING.DRAGONFLY_ATTACK_PERIOD) inst.components.combat:SetRange(TUNING.DRAGONFLY_ATTACK_RANGE, TUNING.DRAGONFLY_FIRE_HIT_RANGE) UpdateFreezeThreshold(inst) inst.components.propagator:StopSpreading() inst.Light:Enable(false)end local function TransformFire(inst) inst.AnimState:SetBuild("dragonfly_fire_build") inst.enraged = true inst.can_ground_pound = true --Set fire stats inst.components.locomotor.walkspeed = TUNING.DRAGONFLY_FIRE_SPEED inst.components.combat:SetDefaultDamage(TUNING.DRAGONFLY_FIRE_DAMAGE) inst.components.combat:SetAttackPeriod(TUNING.DRAGONFLY_FIRE_ATTACK_PERIOD) inst.components.combat:SetRange(TUNING.DRAGONFLY_ATTACK_RANGE, TUNING.DRAGONFLY_HIT_RANGE) inst.Light:Enable(true) inst.components.propagator:StartSpreading() inst.components.moisture:DoDelta(-inst.components.moisture:GetMoisture()) UpdateFreezeThreshold(inst) if inst.reverttask then inst.reverttask:Cancel() inst.reverttask = nil end inst.reverttask = inst:DoTaskInTime(TUNING.DRAGONFLY_ENRAGE_DURATION, function() if inst.enraged then inst:PushEvent("transform", {transformstate = "normal"}) end end)endPay attention to these linesinst.components.combat:SetRange(TUNING.DRAGONFLY_ATTACK_RANGE, TUNING.DRAGONFLY_FIRE_HIT_RANGE)inst.components.combat:SetRange(TUNING.DRAGONFLY_ATTACK_RANGE, TUNING.DRAGONFLY_HIT_RANGE)They are swapped. Link to comment Share on other sites More sharing options...
enragedcamel Posted June 4, 2015 Share Posted June 4, 2015 That's no bug... that's a space station! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.