And also Thanks Torr.
Download V1.1
Spoiler: old versions (Open)After years of research I'm here to present you the Spectator Utility Library (SUL), SUL is a packet of scripts that will help you to Interact with spectators, with that you can do stuff like knowing the coord from where the spectators are looking at, check if the spectator is looking to an object and what's his distance from that object,...
The Project is broken in 3 sub projects:
>SpecUtil : The main library with the minimal required files to get information from spectators.
>SpecExample_1.0: An example mod with build in code to demonstrate some of the use cases of SpecUtil, some of those are:
--Rendering where the spectators are ingame.
--Showing who's watching you (coop spy) [limited to only show the spectators that are watching you but it could be expanded]
>DumbTid: This is a simple wad that sets the players a tid, this is only needed in case you want to run SpecExample with a mod or no mods where it doesn't set the players tid.
Here's an example of SpecExample in action (not as perfect as it's right now)
https://www.youtube.com/watch?v=UZ8o0f20ldU
In Knuckles Horde I used SUL for:
-Rendering the spectators (black transparente balls)
-Rendering the Knuckles (since weapons skin cannot have 3D models :( )
-Adding Dead animation to knuckles.
-Showing who's watching you.
-----------------------------------------------------------------------
Q: I want to Modify or Add those files inside of my mod, am I allowed to do that?
A: Yes, feel free to do what you desire with this mod.
Q:How do I include the SpecUtil to use with my wad?
A: You just don't, all you need is to write this :
Code: Select all
int SpecZ = ACS_NamedExecuteWithResult("GetConsolePlayerCameraZ");
If SUL wasn't loaded then it'll show an error messagel like script GetConsolePlayerCameraZ wasn't found.
Q:Why scripts with return and not functions
A: Because of
-I wanted to force everyone to use the SOL code in clientside only code.
-So you could make decorate objects that could interact with the SOL "functions" without the need of adding new acs code.