Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- 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)
- -- Code
- local hero = PlayerResource:GetSelectedHeroEntity(PlayerID)
- local item = CreateItem("item_hlw_portal", hero, hero)
- CreateItemOnPositionForLaunch(hero:GetAbsOrigin(), item)
- local random = (RandomVector(100)) - 50
- item:LaunchLoot(false, 50, 10, hero:GetAbsOrigin() + random)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement