Dota 2 Workshop Tools/Scripting/API/CDOTA Item.LaunchLoot: Difference between revisions
< Dota 2 Workshop Tools | Scripting | API
Jump to navigation
Jump to search
No edit summary |
Thunder4ik (talk | contribs) m (clean up, added deadend tag) |
||
(One intermediate revision 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 == | ||
''' void LaunchLoot(bool ''useOnContact'', float ''height'', float ''flDuration'', Vector ''destination'') ''' | ''' void LaunchLoot(bool ''useOnContact'', float ''height'', float ''flDuration'', Vector ''destination'') ''' | ||
''For items lying on the ground. Fires the item up into the air so that it lands at the specified position.'' | ''For items lying on the ground. Fires the item up into the air so that it lands at the specified position.'' | ||
;Example | ;Example | ||
Line 38: | Line 35: | ||
|- | |- | ||
| float | | float | ||
| | | flDuration | ||
| How fast the object should traverse its trajectory. Small number (close to 0) means fast, big number means slow. | | How fast the object should traverse its trajectory. Small number (close to 0) means fast, big number means slow. | ||
|- | |- | ||
Line 45: | Line 42: | ||
| Where the item should land | | Where the item should land | ||
|} | |} | ||
[[Category:Dota2Function]] | |||
[[Category:CDOTA_Item]] |
Latest revision as of 09:27, 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
void LaunchLoot(bool useOnContact, float height, float flDuration, Vector destination)
For items lying on the ground. Fires the item up into the air so that it lands at the specified position.
- Example
-- Create a blink dagger at (-256,0,0) and launch it to (256,0,0)
local newItem = CreateItem("item_blink", nil, nil)
newItem:SetPurchaseTime(0)
local spawnPoint = Vector(-256, 0, 0)
local destination = Vector(256, 0, 0)
local drop = CreateItemOnPositionSync(spawnPoint, newItem)
newItem:LaunchLoot(false, 300, 0.75, destination)
Parameters
Type | Name | Description |
---|---|---|
bool | useOnContact | If true, the item will be used when a hero touches it |
float | height | How high into the air the item should be launched |
float | flDuration | How fast the object should traverse its trajectory. Small number (close to 0) means fast, big number means slow. |
Vector | destination | Where the item should land |