Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

Collision (Lib to check for collisions)[v0.01@31.03.17]]


  • Please log in to reply
10 replies to this topic

#1
Maxxxel

Maxxxel

    The One

  • Scripts Developer
  • 1,196 posts
  • LocationGuess the right City to win 10$

Collision is a Lib that gives you the power to check for collision between 2 points and given values

 

Source: https://raw.githubus...n/Collision.lua

(put the Collision.lua into your Common folder)

 

API

 

put the following at the top of your Script if you want to use the Lib

require "Collision"

For every Spell you want to check collision for do the following just ONCE (you can do this right after the requiring)

local name_as_you_wish = Collision:SetSpell(range, speed, delay, width, hitBox)

Now there are 3 Types of functions you can use:


__GetCollision(from, to, mode, exclude)
__GetHeroCollision(from, to, mode, exclude)
__GetMinionCollision(from, to, mode, exclude)

  • from: the starting point
  • to: the ending point
  • mode: number 1 - 6 or "ALL", "ALLY", "ENEMY", "JUNGLE", "ENEMYANDJUNGLE", "ALLYANDJUNGLE"
  • exclude: a list of units or a unit

Example (Anivia Q):

require 'Collision'
local QSpell = Collision:SetSpell(1100, 820, .3, 105, true)

OnDraw = function()
    local block, list = QSpell:__GetCollision(myHero, mousePos, 5)

    if block then
        for i = 1, #list do
            Draw.Circle(list[i])
        end
    end
end

(Note: The Delay is there for future reasons, at the moment it has no effect)


  • 7

#2
Aristo

Aristo

    You donut

  • Moderator
  • 12,671 posts
  • LocationSomewhere over the rainbow

Thanx!


  • 0

#3
LeighaLish

LeighaLish

    Advanced Member

  • Ex-Staff
  • PipPipPip
  • 1,156 posts
.

(Note: The Delay is there for future reasons, at the moment it has no effect)

You got this ported faster than I thought, ty


  • 0

#4
Meeboo

Meeboo

    Advanced Member

  • Scripts Developer
  • 786 posts
  • LocationUnited States

When health prediction for minion Kappa


  • 0

#5
Maxxxel

Maxxxel

    The One

  • Scripts Developer
  • 1,196 posts
  • LocationGuess the right City to win 10$

When health prediction for minion Kappa

as you saw on the voting, the people want the 2 others things first.


  • 0

#6
547437579

547437579

    Newbie

  • Members
  • 2 posts

Where should the file be


  • 0

#7
LeighaLish

LeighaLish

    Advanced Member

  • Ex-Staff
  • PipPipPip
  • 1,156 posts

Where should the file be

Common folder


  • 0

#8
S1NN3K

S1NN3K

    Advanced Member

  • Members
  • 130 posts
  • LocationPaellalandia

What is this? xD


  • 0

#9
Maxxxel

Maxxxel

    The One

  • Scripts Developer
  • 1,196 posts
  • LocationGuess the right City to win 10$

Where should the file be

read first Post?

 

What is this? xD

read first Post?


  • 0

#10
SkylerX

SkylerX

    Newbie

  • Members
  • 1 posts

Where is the common folder just asking lol


  • 0

#11
juauzynhu

juauzynhu

    Advanced Member

  • Contributor
  • 196 posts

Amazing, I can't wait to try it!


  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users