Dota 2 Workshop Tools/Scripting/API/CDOTA BaseNPC.CastAbilityOnTarget: Difference between revisions
< Dota 2 Workshop Tools | Scripting | API
Jump to navigation
Jump to search
RoyAwesome (talk | contribs) (Dota_Lebot push: Updated Page) |
|||
Line 13: | Line 13: | ||
== Parameters == | == Parameters == | ||
{| class="standard-table" style="width: | {| class="standard-table" style="width: 100%;" | ||
! Type | ! Type | ||
! Name | ! Name | ||
! Description | ! Description | ||
! Example | |||
|- | |- | ||
| handle | | handle | ||
| target | | target | ||
| | | The target to this ability is to be casted on | ||
| target | |||
|- | |- | ||
| handle | | handle | ||
| ability | | ability | ||
| | | The ability on the unit to be cast on the target | ||
| keys.caster:FindAbilityByName("mana_burn") | |||
|- | |- | ||
| int | | int | ||
| playerIndex | | playerIndex | ||
| | | The casting units player ID | ||
| keys.caster:GetOwner():GetPlayerID() | |||
|} | |} |
Revision as of 09:22, 17 August 2014

Function Description
void CastAbilityOnTarget(handle target, handle ability, int playerIndex)
Cast an ability on a target entity.
Parameters
Type | Name | Description | Example |
---|---|---|---|
handle | target | The target to this ability is to be casted on | target |
handle | ability | The ability on the unit to be cast on the target | keys.caster:FindAbilityByName("mana_burn") |
int | playerIndex | The casting units player ID | keys.caster:GetOwner():GetPlayerID() |