Dota 2 Workshop Tools/Scripting/API/ProjectileManager.CreateLinearProjectile: Difference between revisions
< Dota 2 Workshop Tools | Scripting | API
Jump to navigation
Jump to search
mNo edit summary |
Thunder4ik (talk | contribs) m (clean up, added deadend tag) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Dead end|date=January 2024}} | |||
{{Note | This page is automatically generated. Any changes may be overwritten}} | {{Note | This page is automatically generated. Any changes may be overwritten}} | ||
== Function Description == | == Function Description == | ||
''' int CreateLinearProjectile(table ''infoTable'') ''' | |||
'' | ''Creates a linear projectile and returns the projectile ID | ||
Table Inputs: Ability, Source, vSpawnOrigin, vVelocity, vAcceleration, fDistance, fStartRadius, fEndRadius, bHasFrontalCone, iUnitTargetTeam, iUnitTargetType, iUnitTargetFlags, bProvidesVision, iVisionTeamNumber, iVisionRadius, bDrawsOnMinimap, bVisibleToEnemies, bIgnoreSource,fExpireTime, fMaxSpeed'' | |||
;Example | ;Example | ||
<source lang="lua"> | <source lang="lua"> | ||
Line 41: | Line 41: | ||
end | end | ||
</source> | </source> | ||
== Parameters == | == Parameters == | ||
{| class="standard-table" style="width: 50%;" | {| class="standard-table" style="width: 50%;" | ||
Line 48: | Line 47: | ||
! Description | ! Description | ||
|- | |- | ||
| | | table | ||
| | | infoTable | ||
| No Description Set | | No Description Set | ||
|} | |} | ||
Line 55: | Line 54: | ||
== Returns == | == Returns == | ||
''int'' - | ''int'' - projectile id | ||
[[Category:Dota2Function]] | |||
[[Category:ProjectileManager]] |
Latest revision as of 10:00, 21 January 2024

This article has no
links to other VDC articles. Please help improve this article by adding links
that are relevant to the context within the existing text.
January 2024


January 2024

Function Description
int CreateLinearProjectile(table infoTable)
Creates a linear projectile and returns the projectile ID
Table Inputs: Ability, Source, vSpawnOrigin, vVelocity, vAcceleration, fDistance, fStartRadius, fEndRadius, bHasFrontalCone, iUnitTargetTeam, iUnitTargetType, iUnitTargetFlags, bProvidesVision, iVisionTeamNumber, iVisionRadius, bDrawsOnMinimap, bVisibleToEnemies, bIgnoreSource,fExpireTime, fMaxSpeed
- Example
--Creates a projectile that will travel 2000 units
function fire_arrow(args)
local caster = args.caster
--A Liner Projectile must have a table with projectile info
local info =
{
Ability = args.ability,
EffectName = args.EffectName,
vSpawnOrigin = caster:GetAbsOrigin(),
fDistance = 2000,
fStartRadius = 64,
fEndRadius = 64,
Source = caster,
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)
end
Parameters
Type | Name | Description |
---|---|---|
table | infoTable | No Description Set |
Returns
int - projectile id