Advertisement
epitaque_

Untitled

Sep 8th, 2015
401
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. -- Problem: the loot is not flying in a random direction 50 units away from the hero (although it is being placed at the heroes' location)
  2.  
  3. -- Code
  4. local hero = PlayerResource:GetSelectedHeroEntity(PlayerID)
  5. local item = CreateItem("item_hlw_portal", hero, hero)
  6. CreateItemOnPositionForLaunch(hero:GetAbsOrigin(), item)
  7. local random = (RandomVector(100)) - 50
  8. item:LaunchLoot(false, 50, 10, hero:GetAbsOrigin() + random)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement