Dota 2 Workshop Tools/Scripting/API/CDOTA BaseNPC.CastAbilityOnTarget: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
(Dota_Lebot push: Updated Page)
Line 13: Line 13:


== Parameters ==
== Parameters ==
{| class="standard-table" style="width: 100%;"
{| class="standard-table" style="width: 50%;"
! Type
! Type
! Name
! Name
! Description
! Description
! Example
|-
|-
| handle
| handle
| target
| target
| The target to this ability is to be casted on
| No Description Set
| target
|-
|-
| handle
| handle
| ability
| ability
| The ability on the unit to be cast on the target as in the KV
| No Description Set
| keys.caster:FindAbilityByName("mana_burn")
|-
|-
| int
| int
| playerIndex
| playerIndex
| The casting units player ID
| No Description Set
| keys.caster:GetOwner():GetPlayerID()
|}
|}
== Example ==
  keys.caster:CastAbilityOnTarget(targetReference, keys.caster:FindAbilityByName("mana_burn"), keys.caster:GetOwner():GetPlayerID())

Revision as of 02:21, 17 June 2015

Note.pngNote: This page is automatically generated. Any changes may be overwritten

Function Description

void CastAbilityOnTarget(handle target, handle ability, int playerIndex)

Cast an ability on a target entity.


Parameters

Type Name Description
handle target No Description Set
handle ability No Description Set
int playerIndex No Description Set