Dota 2 Workshop Tools/Scripting/API/ProjectileManager.CreateTrackingProjectile: Difference between revisions
< Dota 2 Workshop Tools | Scripting | API
Jump to navigation
Jump to search
RoyAwesome (talk | contribs) (Dota_Lebot push: Updated Page) |
RoyAwesome (talk | contribs) (Dota_Lebot push: Updated Page) |
||
Line 6: | Line 6: | ||
''' void CreateTrackingProjectile(handle '' | ''' void CreateTrackingProjectile(handle ''handle_1'') ''' | ||
''Creates a tracking projectile | ''Creates a tracking projectile | ||
Line 54: | Line 54: | ||
|- | |- | ||
| handle | | handle | ||
| | | handle_1 | ||
| No Description Set | | No Description Set | ||
|} | |} |
Revision as of 19:38, 20 June 2015

Function Description
void CreateTrackingProjectile(handle handle_1)
Creates a tracking projectile
Table Inputs: Ability, Source, Target, EffectName, iMoveSpeed, vSourceLoc, iSourceAttachment, bProvidesVision, iVisionTeamNumber, iVisionRadius, bDrawsOnMinimap, bDodgeable, bIsAttack, bVisibleToEnemies, bReplaceExisting, flExpireTime
- Example
--Create a tracking projectile from player 1 that follows player 2
local caster = PlayerResource:GetPlayer(0):GetAssignedHero()
local target = PlayerResource:GetPlayer(1):GetAssignedHero()
local info =
{
Target = target,
Source = caster,
Ability = caster:GetAbilityByIndex(0),
EffectName = "some_particle_effect",
vSpawnOrigin = caster:GetAbsOrigin(),
fDistance = 2000,
fStartRadius = 64,
fEndRadius = 64,
bHasFrontalCone = false,
bReplaceExisting = false,
iUnitTargetTeam = DOTA_UNIT_TARGET_TEAM_ENEMY,
iUnitTargetFlags = DOTA_UNIT_TARGET_FLAG_NONE,
iUnitTargetType = DOTA_UNIT_TARGET_HERO + DOTA_UNIT_TARGET_BASIC,
fExpireTime = GameRules:GetGameTime() + 10.0,
bDeleteOnHit = true,
vVelocity = caster:GetForwardVector() * 1800,
bProvidesVision = true,
iVisionRadius = 1000,
iVisionTeamNumber = caster:GetTeamNumber()
}
projectile = ProjectileManager:CreateLinearProjectile(info)
Parameters
Type | Name | Description |
---|---|---|
handle | handle_1 | No Description Set |