+ Reply to Thread
Results 1 to 10 of 10

Thread: Spacebuild Environment Probe Name Output

  1. #1
    Wirererer carocrazy132's Avatar
    Join Date
    May 2009
    Posts
    122

    Question Spacebuild Environment Probe Name Output

    In the latest life support in space build 3, there is an environment probe that gives you the name of the planet (really just tells you what atmosphere you are in) you are currently on (as well as other atmospheric properties). The probe does not, however, output the planet name. Does anyone have a way of grabbing the planet name without using a million coordinates and checking where you are to see if you're on the planet? I would much rather not take this approach as I don't really feel like taking the time to GET all those coordinates.

    -All help appreciated greatly

  2. #2
    Wire Sofaking Rybec's Avatar
    Join Date
    Apr 2008
    Location
    Denver
    Posts
    648

    Default Re: Spacebuild Environment Probe Name Output

    I don't have any sort of fancy trick, but you *might* be able to use the entity find functions to get the atmospheres.
    That'd give you coords, and you could figure out which planet is which by having something point at the planet so you can identify it.
    From there you could just do a if (Pos:distance(Planet)<Planet's radius) to see if you're on the planet.

    That reduces it to one coordinate and one radius per planet, much easier to track.

  3. #3
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: Spacebuild Environment Probe Name Output

    McBuilds has custom E2 functions such as E:lsName() which returns the name of the atmosphere E is currently in.
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  4. #4
    Wirererer carocrazy132's Avatar
    Join Date
    May 2009
    Posts
    122

    Default Re: Spacebuild Environment Probe Name Output

    Unfortunately Divran, I mostly use my ship on spaceage so IsName isn't on there.

    as for Rybec, is there an object that controls the atmospher that I could use as this pointer? If I could simply find the distance from the center of the atmosphere using such a point then this solution works great, I would rather not create an object on each planet for this purpose, but it may have to be done.

  5. #5
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: Spacebuild Environment Probe Name Output

    Quote Originally Posted by carocrazy132 View Post
    Unfortunately Divran, I mostly use my ship on spaceage so IsName isn't on there.

    as for Rybec, is there an object that controls the atmospher that I could use as this pointer? If I could simply find the distance from the center of the atmosphere using such a point then this solution works great, I would rather not create an object on each planet for this purpose, but it may have to be done.
    That's L, not I, in lsName.

    I've forgotten what the entity class names are, but yes, the planet atmospheres are entities and you can find them using the find functions. Try something like this to find it:
    Code:
    @outputs Entities:array
    interval(1000)
    findInSphere(owner():pos(),1000)
    Entities = findToArray()
    printTable(Entities)
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  6. #6
    Wire Sofaking feha's Avatar
    Join Date
    Sep 2009
    Location
    Here
    Posts
    1,156

    Default Re: Spacebuild Environment Probe Name Output

    findByClass("base_sb_planet2") or findByClass("sb_base_planet2")

    Dont remember which one. Also, for sb2 maps like sb_gooniverse, remove "2". Myself I usually put "*" there so my e2 works on any sb_ map.

    The lsBlah() functionso n mcbuild does not work on planets entity, as they apparently doesnt return as valid. Instead we solve that by creating a invisible holo at every planet, then use it. Just remember that the holos for some reason doesnt work immediately, as if it takes 1 second to actually spawn them.

  7. #7
    billywitchdoctor.com Schilcote's Avatar
    Join Date
    Jan 2009
    Location
    There.
    Posts
    2,006

    Default Re: Spacebuild Environment Probe Name Output

    LS planets are designated by a logic_case entity in their center. The first output of the logic_case is the name of the planet. You can find it with find functions, but reading the data from it is a different matter. I don't think it can be done.


    [19:16:47]Client "rcdraco" spawned in server
    [19:17:10]rcdraco: hamburgertime
    [19:18:04]rcdraco was killed by worldspawn
    [19:21:50]Dropped "rcdraco" from server

  8. #8
    Wirererer carocrazy132's Avatar
    Join Date
    May 2009
    Posts
    122

    Default Re: Spacebuild Environment Probe Name Output

    I continue to see base_sb_planet2 pop up on the nearby entites, but the atmosphere name, etc. seems to be a property of that specific entity of base_sb_planet2, anyone know how I can get this information out of the entity?

  9. #9
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: Spacebuild Environment Probe Name Output

    Quote Originally Posted by carocrazy132 View Post
    I continue to see base_sb_planet2 pop up on the nearby entites, but the atmosphere name, etc. seems to be a property of that specific entity of base_sb_planet2, anyone know how I can get this information out of the entity?
    Look's like it's (in lua)
    Code:
    Ent.sbenviroment:GetEnviromentName()
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  10. #10
    Wirererer carocrazy132's Avatar
    Join Date
    May 2009
    Posts
    122

    Default Re: Spacebuild Environment Probe Name Output

    I tried Identifying the planets by gravity but in forlorn there are 3 planets with gravity of 1 and their pressure is the same. The amount of O2, etc. will change depending on whether or not someone turns on a gas compressor on that planet or not so I can't base off of that, any suggestions? I could use feha's Idea but I would REALLY rather not take that time, thats a whole second set of coordinates.

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots