Announcement

Collapse

Forum Rules

  • No flaming or derogatory remarks, directly or through insinuation.
  • No discussion, sharing or referencing illegal software such as hacks, keygen, cracks and pirated software.
  • No offensive contents, including but not limited to, racism, gore or pornography.
  • No excessive spam/meme, i.e. copious one liners in a short period of time, typing with all caps or posting meme responses (text/image).
  • No trolling, including but not limited to, flame incitation, user provocation or false information distribution.
  • No link spamming or signature advertisements for content not specific to Dota 2.
  • No Dota 2 key requests, sell, trade etc.
  • You may not create multiple accounts for any purpose, including ban evasion, unless expressly permitted by a moderator.

  • Please search before posting. One thread per issue. Do not create another thread if there is an existing one already.
  • Before posting anything, make sure you check out all sticky threads (e.g., this). Do not create new threads about closed ones.
  • It is extremely important that you post in correct forum section.

  • Balance discussion only in Misc.
  • All art related (such as hero model) feedbacks go to Art Feedback Forum.
  • All matchmaking feedback should go here: Matchmaking Feedback
  • All report/low priority issues should go here: Commend/Report/Ban Feedback
  • No specific workshop item feedback. These should go to workshop page of that item.
  • When posting in non-bugs section (such as this), use [Bugs], [Discussion] or [Suggestion] prefix in your thread name.



In case you object some action by a moderator, please contact him directly through PM and explain your concerns politely. If you are still unable to resolve the issue, contact an administrator. Do not drag these issues in public.



All rules are meant to augment common sense, please use them when not conflicted with aforementioned policies.
See more
See less

Crash on double clicking the newly created hero.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Crash on double clicking the newly created hero.

    If you don't double click strait away it won't crash. Here is the video I show this. First, I select a hero through double clicking the main hero but next time I double click new created unit and the game crashes.


    The map will also crash if you select two such units and a hero.

    This is the code I use:
    Code:
    LinkLuaModifier( "arc_warden_tempest_double_modifier", "heroes/hero_arc_warden/arc_warden_tempest_double_lua.lua", LUA_MODIFIER_MOTION_NONE )
    
    
    arc_warden_tempest_double = class({})
    
    function arc_warden_tempest_double:OnSpellStart()
    	
    	local caster = self:GetCaster()
    	local spawn_location = caster:GetOrigin()
    	local health_cost = 1 - (self:GetSpecialValueFor("health_cost") / 100)
    	local mana_cost = 1 - (self:GetSpecialValueFor("mana_cost") / 100)
    	local duration = self:GetSpecialValueFor("duration")
    	local health_after_cast = caster:GetHealth() * mana_cost
    	local mana_after_cast = caster:GetMana() * health_cost
    
    	caster:SetHealth(health_after_cast)
    	caster:SetMana(mana_after_cast)
    	local double = CreateUnitByName( caster:GetUnitName(), spawn_location, true, caster, caster:GetOwner(), caster:GetTeamNumber())
    	double:SetControllableByPlayer(caster:GetPlayerID(  ), false)
    
    	local caster_level = caster:GetLevel()
    	for i = 2, caster_level do
    		double:HeroLevelUp(false)
    	end
    
    
    	for ability_id = 0, 15 do
    		local ability = double:GetAbilityByIndex(ability_id)
    		if ability then
    			if ability:GetName() ~= "arc_warden_tempest_double" then
    				ability:SetLevel(caster:GetAbilityByIndex(ability_  id):GetLevel())
    			end
    		end
    	end
    
    
    	for item_id = 0, 5 do
    		local item_in_caster = caster:GetItemInSlot(item_id)
    		if item_in_caster ~= nil then
    			local item_name = item_in_caster:GetName()
    			if not (item_name == "item_aegis" or item_name == "item_smoke_of_deceit" or item_name == "item_recipe_refresher" or item_name == "item_refresher" or item_name == "item_ward_observer" or item_name == "item_ward_sentry") then
    				local item_created = CreateItem( item_in_caster:GetName(), double, double)
    				double:AddItem(item_created)
    				item_created:SetCurrentCharges(item_in_caster:GetC  urrentCharges()) 
    			end
    		end
    	end
    
    	double:SetHealth(health_after_cast)
    	double:SetMana(mana_after_cast)
    
    	double:SetMaximumGoldBounty(0)
    	double:SetMinimumGoldBounty(0)
    	double:SetDeathXP(0)
    	double:SetAbilityPoints(0) 
    
    	double:SetHasInventory(false)
    	double:SetCanSellItems(false)
    
    	double:AddNewModifier(caster, self, "arc_warden_tempest_double_modifier", nil)
    	double:AddNewModifier(caster, self, "modifier_kill", {["duration"] = duration})
    	
    end
    
    arc_warden_tempest_double_modifier = class({})
    
    function arc_warden_tempest_double_modifier:DeclareFunction  s()
    	return {MODIFIER_PROPERTY_SUPER_ILLUSION, MODIFIER_PROPERTY_ILLUSION_LABEL, MODIFIER_PROPERTY_IS_ILLUSION, MODIFIER_EVENT_ON_TAKEDAMAGE }
    end
    
    function arc_warden_tempest_double_modifier:GetIsIllusion()
    	return true
    end
    
    function arc_warden_tempest_double_modifier:GetModifierSupe  rIllusion()
    	return true
    end
    
    function arc_warden_tempest_double_modifier:GetModifierIllu  sionLabel()
    	return true
    end
    
    function arc_warden_tempest_double_modifier:OnTakeDamage( event )
    	if event.unit:IsAlive() == false then
    		event.unit:MakeIllusion()
    	end
    end
    
    function arc_warden_tempest_double_modifier:GetStatusEffect  Name()
    	return "particles/status_fx/status_effect_ancestral_spirit.vpcf"
    end
    
    function arc_warden_tempest_double_modifier:IsHidden()
    	return true
    end
    
    function arc_warden_tempest_double_modifier:GetAttributes()
    	return MODIFIER_ATTRIBUTE_PERMANENT
    end
    This is the map: http://steamcommunity.com/sharedfile.../?id=306350420

    Crash dumps included win64.zip
    Known Tooltips and UI information Issues List
    Unreleased heroes data:

    Hero Balance Compilation 6.48 onwards
    Items and Other Balance compilation 6.48 onwards
    Dota 1 6.81c Test Map

  • #2
    I came up with a fix. Instead of not giving the tempest double ability, I give it but deactivate it.
    Code:
    for ability_id = 0, 15 do
    		local ability = double:GetAbilityByIndex(ability_id)
    		if ability then
    			
    			ability:SetLevel(caster:GetAbilityByIndex(ability_id):GetLevel())
    			if ability:GetName() == "arc_warden_tempest_double" then
    				ability:SetActivated(false)
    			end
    		end
    	end
    No more crashes.
    Known Tooltips and UI information Issues List
    Unreleased heroes data:

    Hero Balance Compilation 6.48 onwards
    Items and Other Balance compilation 6.48 onwards
    Dota 1 6.81c Test Map

    Comment

    Working...
    X