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

Vision callbacks: OnGainVision // OnLoseVision (unit)


  • Please log in to reply
No replies to this topic

#1
Async

Async

    Advanced Member

  • Contributor
  • 107 posts

I've coded this as it's missing in GoS EXT.

 

Generates 2 callbacks, OnLoseVision and OnGainVision returning the unit you Lost/Gained vision on.

 

Save it in Common folder.

 

 

Example script:

require("visionCallback")

OnGainVision(function(unit)
	print(unit.charName .. " appeared.")
end)
OnLoseVision(function(unit)
	print(unit.charName .. " disappeared.")
end)

Result:

 

25409418461b0d6eb24ca5b5c22a43ab.gif

 

 

 

 

You can access to the table these 2 callbacks use with the following code:

print(type(_VISION_TABLE)) -- table

Not recommended editing it unless you know what you are doing!

 

 

SOURCE

 

Credits:

MeoBeo's Buff script


  • 0




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users