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 … 10 11 12 13 14 … 18 Next »
SF Entity:getEnvironmentData()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
SF Entity:getEnvironmentData()
31-01-2016, 03:47 PM,
#1
SuperPlayer Offline
TSCM Super Member
****
Posts: 234
Threads: 30
Joined: Oct 2014
SF Entity:getEnvironmentData()
Well i am working on an anti-intruder system which jails all players when i am in space. I am using Entity:getEnvironmentData() for this. Basicly i am doing this:

local Players = find.allPlayers()
for i = 1 ,#Players do
local Env = Players[i]:getEnvironmentData().Entity
if IsValid( Env ) and Env == LSCores[1] then
print("Someone entered our ship")
end
end

If I correctly understood how this function works it should only print the message if I am in space and my LS Core is on. But for some reason it also prints it when i am on a planet with turned on LS Core. But only if someone is beaming in or out of my ship with the Star Trek teleporter. And their enviroment stays as my LS Core only during the transporting process. After that it goes back to the planet enviroment.
Is this a bug in my code or in Entity:getEnvironmentData()?
If it is a bug in my code how do i resolve this?

SuperPlayer
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
SF Entity:getEnvironmentData() - by SuperPlayer - 31-01-2016, 03:47 PM
RE: SF Entity:getEnvironmentData() - by TheOneAndOnlyTee - 31-01-2016, 03:58 PM
RE: SF Entity:getEnvironmentData() - by SuperPlayer - 31-01-2016, 04:01 PM
RE: SF Entity:getEnvironmentData() - by esitee - 31-01-2016, 04:38 PM
RE: SF Entity:getEnvironmentData() - by Person8880 - 31-01-2016, 07:53 PM

  • View a Printable Version
Forum Jump:


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

Powered By MyBB, © 2002-2026 MyBB Group.