User:ArthurAutomaton/sandbox: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 21: Line 21:


= Unofficial Dota 2 Modding Tools =
= Unofficial Dota 2 Modding Tools =
These tools have been created by members of the modding community and are not supported by Valve.


== KeyValue files ==
== KeyValue files ==

Revision as of 04:04, 20 August 2014

Sandbox

Some notes to myself about modding DotA 2.

Creating a unit that's controllable by a specific player

This code creates a mud golem at (0, 0, 0) on the Radiant team and makes it controllable by player 0:

unit_team = DOTA_TEAM_GOODGUYS
unit_name = "npc_dota_neutral_mud_golem"
player = PlayerResource:GetPlayer(0)
point = Vector(0, 0, 0)

unit = CreateUnitByName(unit_name, point, true, nil, nil, unit_team)
unit:SetControllableByPlayer(player:GetPlayerID(), true)


Relevant links:

Unofficial Dota 2 Modding Tools

These tools have been created by members of the modding community and are not supported by Valve.

KeyValue files

API

Misc