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

Register

Team Spartan Cookies & Milk Forums Garry's Mod Help and Support v
« Previous 1 … 15 16 17 18 19 … 21 Next »
[Solved] New Changes to SF Stargate Functions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pages (2): 1 2 Next »
Threaded Mode
[Solved] New Changes to SF Stargate Functions
24-05-2015, 05:48 PM, (This post was last modified: 25-05-2015, 11:57 AM by Salira.)
#1
Salira Offline
Valued donator and member
****
Posts: 196
Threads: 78
Joined: May 2015
Question  [Solved] New Changes to SF Stargate Functions
Since the last server update with the more secure private stargates, I've been trying to fix the dialing computer that I have. My only problem is getting the group and making sure of whether it should be included or excluded from the address string. Is it possible you could add a function like this?

Code:
stargate.addressRelative(gate1, gate2) --AND gate1:addressRelative(gate2)
If gate2 is private, returns an empty string "". Otherwise, returns the address gate1 must dial to establish a wormhole to gate2, including the group if it's a different group or both are Universe gates too far away for a 7 symbol connection.
Find
Reply
24-05-2015, 05:54 PM,
#2
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: New Changes to SF Stargate Functions
Nope. That's called doing the work for you. Wink

It's not too hard to figure out the rules of the gate address system. There wouldn't be any fun or challenge in having it done for you. That's why the entity dialling was removed in the first place.
Find
Reply
24-05-2015, 09:02 PM,
#3
Salira Offline
Valued donator and member
****
Posts: 196
Threads: 78
Joined: May 2015
RE: New Changes to SF Stargate Functions
(24-05-2015, 05:54 PM)Person8880 Wrote: Nope. That's called doing the work for you. Wink

It's not too hard to figure out the rules of the gate address system. There wouldn't be any fun or challenge in having it done for you. That's why the entity dialling was removed in the first place.

Alright. The least I need to know is the range at which universe gates will have to use the 8th chevron to connect with each other, and how to calculate the distance between two entities.
Find
Reply
24-05-2015, 09:26 PM,
#4
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: New Changes to SF Stargate Functions
The distance for SGU gates using the 8th chevron is 16000 units, and calculating the distance between two entities is:
function EntityDistance( Ent1, Ent2 )
return Ent1:pos()Big Grinistance( Ent2:pos() )
end
Find
Reply
25-05-2015, 11:56 AM,
#5
Salira Offline
Valued donator and member
****
Posts: 196
Threads: 78
Joined: May 2015
RE: New Changes to SF Stargate Functions
(24-05-2015, 09:26 PM)Person8880 Wrote: The distance for SGU gates using the 8th chevron is 16000 units, and calculating the distance between two entities is:
function EntityDistance( Ent1, Ent2 )
return Ent1:pos()Big Grinistance( Ent2:pos() )
end

Thanks. Smile
Find
Reply
25-05-2015, 12:41 PM,
#6
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: [Solved] New Changes to SF Stargate Functions
Check the code again, just realised I wrote how to do it in GLua and not Starfall!

Basically change GetPos() to pos().
Find
Reply
25-05-2015, 01:21 PM, (This post was last modified: 25-05-2015, 01:21 PM by LocInt.)
#7
LocInt Offline
Long gone
****
Posts: 489
Threads: 91
Joined: Aug 2014
RE: [Solved] New Changes to SF Stargate Functions
Seems kind of pointless to calculate the distance since stargate.address(gate) will automatically give you the right address configuration which is kind of stupid.

тѕсм.Person8880 hovers the nerf bat over Tetryon damage
Website Find
Reply
25-05-2015, 01:52 PM,
#8
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: [Solved] New Changes to SF Stargate Functions
(25-05-2015, 01:21 PM)LocInt Wrote: Seems kind of pointless to calculate the distance since stargate.address(gate) will automatically give you the right address configuration which is kind of stupid.
It doesn't? It only gives the 6 symbol base address, not the group or the correct ending.
Find
Reply
25-05-2015, 02:12 PM, (This post was last modified: 25-05-2015, 02:13 PM by LocInt.)
#9
LocInt Offline
Long gone
****
Posts: 489
Threads: 91
Joined: Aug 2014
RE: [Solved] New Changes to SF Stargate Functions
(25-05-2015, 01:52 PM)Person8880 Wrote:
(25-05-2015, 01:21 PM)LocInt Wrote: Seems kind of pointless to calculate the distance since stargate.address(gate) will automatically give you the right address configuration which is kind of stupid.
It doesn't? It only gives the 6 symbol base address, not the group or the correct ending.

My mistake. But well you can see the whole address from addressList and then you just add few if statements for matching target gate class and done. No need for distance calculations.

тѕсм.Person8880 hovers the nerf bat over Tetryon damage
Website Find
Reply
25-05-2015, 02:27 PM,
#10
Person8880 Offline
gpj.ecafllorT
*******
Posts: 2,407
Threads: 45
Joined: Sep 2013
RE: [Solved] New Changes to SF Stargate Functions
Address list just gives you what the UI gives you. If you know someone's gate address, but it's private, then you do need to know how far away it is if your gate and their gate are both the universe type.
Find
Reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »


  • 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.