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) |
(The example was for linear projectile) |
||
Line 28: | Line 28: | ||
Ability = caster:GetAbilityByIndex(0), | Ability = caster:GetAbilityByIndex(0), | ||
EffectName = "some_particle_effect", | EffectName = "some_particle_effect", | ||
vSourceLoc= caster:GetAbsOrigin(), | |||
bDrawsOnMinimap = false, | |||
bDodgeable = true, | |||
bIsAttack = false, | |||
bVisibleToEnemies = true, | |||
bReplaceExisting = false, | |||
flExpireTime = GameRules:GetGameTime() + 10, | |||
bProvidesVision = true, | bProvidesVision = true, | ||
iVisionRadius = | iVisionRadius = 400, | ||
iVisionTeamNumber = caster:GetTeamNumber() | iVisionTeamNumber = caster:GetTeamNumber() | ||
} | } | ||
projectile = ProjectileManager: | projectile = ProjectileManager:CreateTrackingProjectile(info) | ||
</source> | </source> |
Revision as of 07:28, 17 July 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",
vSourceLoc= caster:GetAbsOrigin(),
bDrawsOnMinimap = false,
bDodgeable = true,
bIsAttack = false,
bVisibleToEnemies = true,
bReplaceExisting = false,
flExpireTime = GameRules:GetGameTime() + 10,
bProvidesVision = true,
iVisionRadius = 400,
iVisionTeamNumber = caster:GetTeamNumber()
}
projectile = ProjectileManager:CreateTrackingProjectile(info)
Parameters
Type | Name | Description |
---|---|---|
handle | handle_1 | No Description Set |