Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 … 8 9 10 11 12 … 18 Next »
Modbridge Light Changer Lib(MLCL)
Poll: Should i let people alter the other materials of corridor props?
You do not have permission to vote in this poll.
Keep it as it is (just lights)
33.33%
2 33.33%
Yeah (add index parameter)
66.67%
4 66.67%
Total 6 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode
Modbridge Light Changer Lib(MLCL)
02-11-2016, 03:14 AM,
#1
TheOneAndOnlyTee Offline
GMod Admin
Posts: 755
Threads: 47
Joined: Oct 2013
Modbridge Light Changer Lib(MLCL)
This isn't meant for non-coders, so do not expect this to do anything on it's own.

What is this?
This is a lib you can include that contains some handy functions for changing the lights submaterials in the modbridge corridor props on the ship that the chip running this is on.
It's rather easy to use at the downside that it only works for the lights on the corridor props and only those on your ship.
Should it encounter an error other than invalid material (atm) it will give you info on what happen and where it came from

oh cool so How can I use this?
before you go running the functions you of course need to add it as a dependency to your code via
--@dependency STEAM_0:1:35990257 t_stuff/MLCL.txt sv

Now that it's included you have access to the following functions;
  1. MLCL.Help() , this will print out the functions much like this section incase you forget.
  2. MLCL.getProps() , this finds the current props attached to the same ship as the chip (note:it will not work if there's more than 600 corridor props).
  3. MLCL.test() , this will do a quick test so you can see if it works provided you've run getProps() first.
  4. MLCL.setProps( material ) , this updates all stored props with the passed material.
  5. MLCL.setProp( entity, material ) , same as above but for the passed prop only. (unknown effect on non-modbridge corridor props)
  6. MLCL.revertProps() , if you've changed the material then this will change it back to the last material.
  7. MLCL.revertProp( entity ) , same as above but for the passed prop only. (unknown effect on non-modbridge corridor props)

Example chip
This is untested because i just wrote it in the browser but it should work just fine.

--@name MLCL Example Usage
--@author T-18
--@dependency STEAM_0:1:35990257 t_stuff/MLCL.txt sv
if SERVER then
MLCL.getProps()
MLCL.setProps( "glow/flash_yellow" )
timer.simple(5,function()
MLCL.revertProps()
end)
end

You need help?
If you need help using this then i'm reluctant to assist because it's really really easy to use so don't be surprised if i just ignore you
but if you're encountering a problem or have a good idea relating to this then i'm all ears.

Lastly @new SF coders, before you go granting someone tool perms to see your code for help be sure they know what they're doing.

Steam Profile
My Discord Server
Need help with E2 or SF? , just ask me and i'll try to help.
[Image: 98Dkcoz.gif]
Find
Reply
02-11-2016, 03:24 AM,
#2
Red The Blue Color Offline
TSCM Super Donating Member
****
Posts: 422
Threads: 34
Joined: Feb 2015
RE: Modbridge Light Changer Lib(MLCL)
Your mistake goes unnoticed.

[Image: unnoticedmistake.PNG]

"with it's superior software, i have no doubt it will succeed in finding fuck all" - T-17, 2016

[Super Member] [ENCOM] т-ѕсм.Red The Blue Color™: server do you support Hitler?
[Server] srcds_linux: The probabilty is about 99.99%, so interpret that how you want to.
Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
Forum Jump:


Users browsing this thread:
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.